I need to install Python 3.9 on RHEL 7 system ( about 10 servers in each environment ) and then update / install Ansible 2.11 on the system. This is in preparation to upgrade Confluent version on these servers. I understand, on RHEL 7, we have to keep python 2 as it is used by OS. Currently, we have Python2 and Ansible 2.9.27 on the host server in the other non-sandbox environments.
On my sandbox servers, as a POC, I installed Python 3.9 manually using these install steps and then installed Ansible 2.11 ( using python3 -m pip install ansible==4.10.0 )
But in the non-sandbox environments, I want to try and do this using Ansible playbook, if possible.
I can try to create a playbook and add the steps from the above document to Ansible shell or command module, but my concern / question is - is it possible to instal Python 3.9 and install / upgrade Ansible to version 2.11 where currently my Ansible is 2.9.27 and Python is Python 2? Or is there a better way to automate these 2 installs / upgrades on all of confluent servers in the different environments?
Can someone provide some guidance on this? Or am I stuck doing both of these manually ?
Thank you