cp-ansible
cp-ansible copied to clipboard
Confluent Ansible 7.2+ require python 3.6+, but Ansible yum module only works on Python2
Describe the issue https://docs.confluent.io/ansible/current/ansible-requirements.html#general-requirements https://docs.ansible.com/ansible/latest/collections/ansible/builtin/yum_module.html
Confluent Ansible 7.2+ require python 3.6+, but Ansible yum module only works on Python2, this will have conflict and get error like log show
Logs
TASK [common : Install OpenSSL and Unzip] ******************************************************************************************************************************************************************
Wednesday 22 February 2023 19:12:56 +0800 (0:00:00.165) 0:00:15.531 ****
fatal: [52.131.243.227]: 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."}
fatal: [40.72.183.194]: 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."}
fatal: [52.131.247.149]: 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."}
Environment (please complete the following information):
- OS: [e.g. RHEL 7.9]
- CP-Ansible Branch: [7.3.2-post]
- Ansible Version [e.g. ansible 2.14]
Additional context Add any other context about the problem here.
Leave python2 as is for yum to work; but add this var in your host_vars or group_vars: ansible_python_interpreter: /usr/bin/python3