From 91c70c1c83c433c0f181a12fa8161db2f0a872bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Tue, 27 Nov 2018 09:53:10 +0100 Subject: [PATCH] Invoking "dnf" only once while using a loop via squash_actions is deprecated. addressing warning: [DEPRECATION WARNING]: Invoking "dnf" only once while using a loop via squash_actions is deprecated. Instead of using a loop to supply multiple items and specifying `name: {{ item }}`, please use `name: [u'{{ global_pkgs_inst }}']` and remove the loop. This feature will be removed in version 2.11. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. --- roles/base/tasks/main.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/roles/base/tasks/main.yml b/roles/base/tasks/main.yml index 2706c7e3e7..7aa9fc5e4a 100644 --- a/roles/base/tasks/main.yml +++ b/roles/base/tasks/main.yml @@ -97,9 +97,7 @@ when: ansible_distribution_major_version|int < 22 - name: global default packages to install (dnf) - dnf: state=present name={{ item }} - with_items: - - "{{ global_pkgs_inst }}" + dnf: state=present name="{{ global_pkgs_inst }}" tags: - packages - base