2
1
Some of my ansible playbooks start with installation of python2-dnf
package that is required for dnf ansible module to run.
tasks:
- name: Install required dnf python binding
shell: dnf install -y python2-dnf
changed_when: False
Direct call of dnf
in shell module results in following warning
[WARNING]: Consider using dnf module rather than running dnf
How such warning can be avoided or what is the suggested way to make sure that package python2-dnf
is installed and thus module dnf can be used?