From c96b973b600389688ed4cbb826d53d1ba9b73afb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Fri, 14 Feb 2020 15:07:08 +0100 Subject: [PATCH] remove deprecation warning addressing: TASK [Install desired extra packages (dnf)] ********************************************************************************************* Friday 14 February 2020 14:03:04 +0000 (0:00:00.062) 0:00:12.297 ******* [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 `pkg: "{{ item }}"`, please use `pkg: ['ntpdate', 'libselinux-python']` 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. --- tasks/cloud_setup_basic.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tasks/cloud_setup_basic.yml b/tasks/cloud_setup_basic.yml index b34fdb283c..5eddbc395a 100644 --- a/tasks/cloud_setup_basic.yml +++ b/tasks/cloud_setup_basic.yml @@ -11,10 +11,11 @@ - packages - name: Install desired extra packages (dnf) - dnf: state=present pkg={{ item }} - with_items: - - ntpdate - - libselinux-python + dnf: + state: present + pkg: + - ntpdate + - libselinux-python when: ansible_distribution_major_version|int > 7 and ansible_distribution == 'RedHat' and ansible_cmdline.ostree is not defined tags: - packages