We have full functional ansible on Ubuntu 18.04 LTS and all our playbooks are running successfully without any issue on ubuntu 18.04 LTS.
We are trying to run the playbook on ubuntu 20.04 LTS and run the playbook which install some apt packages on the remote server but we getting
Fatal error msg: No package matching ‘python-pip’ is available
However the package and dependencies are install when the remote OS is ubuntu 18.04
Can you please guide us now to resolve this issue ?
This is correct. So far you've implicitly used python2 as the
interpreter on the target host.
Python2 has been EOL for a while, and starting with Ubuntu 20.04 it is
not available anymore.
Solution: start using python3 as the interpreter.
This might mean you have to change the python3 version of whatever pip
packages you used to use on Ubuntu 18.04.
You can set this for this target OS only.
https://docs.ansible.com/ansible/latest/reference_appendices/interpreter_discovery.html
If all your target hosts have python3 (Ubuntu 18.04 LTS does), you can
also start using python3 for all your target, avoiding extra
configuration drift with mixed python2/python3.
Unless of course your target hosts include hosts with OSes that ONLY
run python2.
Thank you the the tip let me try it
we have all OS using python 2