When I configure python3 for target node for example as follows
ansible_python_interpreter=/usr/bin/python3
This results in an error message on tasks that use package module.
The Python 2 bindings for rpm are needed for this module. If you require Python 3 support use the
dnfAnsible module instead
This make me wonder if Ansible supports Python 3 on target nodes. On my controller node I have Ansible 2.10.3 / Python 3.6.9 which seems to work fine. But on the target node the very very common package module is no longer usable and needs to be replace with dnf module.
The problem is that thousands of Ansible roles published on Ansible Galaxy use the package module.
The conclusion is that Ansible 2.10.3 does not support Python 3 in practice?
Wouldn't it be better to change the package module to support dnf? That way we wouldn't have to change all the Ansible roles for Python 3. Ansible Galaxy roles ideally would not have to be changed to support a different version of Python. If at all possible.
In any case, what is the recommend practice currently? Don't use Python 3 on target nodes?