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.
This commit is contained in:
Miroslav Suchý 2020-02-14 15:07:08 +01:00 committed by Pierre-Yves Chibon
parent d2ce8afd46
commit c96b973b60

View file

@ -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