I have to run ansible playbook file but there is an error occured that ask me to install python-dnf

Viewed 16

I run my file through this command:

ansible-playbook --ask-become-pass ~/install_packages/site.yml

But when i run i recieven an error:

TASK [install packages] ***************************************************************************************************************** fatal: [localhost]: FAILED! => {"changed": false, "msg": "Could not import the dnf python module using /usr/bin/python3 (3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]). Please install python3-dnf or python2-dnf package or ensure you have specified the correct ansible_python_interpreter. (attempted ['/usr/libexec/platform-python', '/usr/bin/python3', '/usr/bin/python2', '/usr/bin/python'])", "results": []}

I am using Debian11 and i don't know what I do?

0 Answers
Related