Install Ansible for python 2.7

Quote from moshe on 23/05/2021, 12:50 pmProblem
User wants to install Ansible on old python 2.7 on an old environments to use old code.
Solutions
sudo root
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
python ./get-pip.py
python -m pip install –user ansible
python -m pip install –user paramikocd /root/.local/
mv * /usr/local/chmod -R a+rX /usr/local/lib/python2.7/site-packages/ansible
pip install ansibleNOTE:
Python 2.7 is obsolete from 1/1/2020 and no longer updated. it is recommended to upgrade to python 3.8.x and update your code
Problem
User wants to install Ansible on old python 2.7 on an old environments to use old code.
Solutions
sudo root
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
python ./get-pip.py
python -m pip install –user ansible
python -m pip install –user paramikocd /root/.local/
mv * /usr/local/chmod -R a+rX /usr/local/lib/python2.7/site-packages/ansible
pip install ansible
NOTE:
Python 2.7 is obsolete from 1/1/2020 and no longer updated. it is recommended to upgrade to python 3.8.x and update your code