Im trying to pip install a requirements file in my python3 environment using the following task
pip:
python3: yes
requirements: ./requirements/my_requirements.txt
extra_args: -i http://mypypi/windows/simple
I checked which version ansible is running on the controller node (RH7) and it's 3.6.8
ansible-playbook 2.9.9
config file = None
configured module search path = ['/home/{hidden}/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
executable location = /usr/local/bin/ansible-playbook
python version = 3.6.8 (default, Jun 11 2019, 15:15:01) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
No config file found; using defaults
I am however getting the following error:
fatal: [default]: FAILED! => {"changed": false, "msg": "The Python 2 bindings for rpm are needed for this module. If you require Python 3 support use the `dnf` Ansible module
instead.. The Python 2 yum module is needed for this module. If you require Python 3 support use the `dnf` Ansible module instead."}
My controller node is running RH7. The targets are centos7 (provisioned by vagrantfiles)
Does anyonek now how to solve this?