Fix "Could not import python modules: apt, apt_pkg. Please install python-apt package" error.
Added -e ansible_python_interpreter=/usr/bin/python
to the ansible-playbook
command to avoid “Could not import python modules: apt, apt_pkg. Please install python-apt package” error, as a different python, without the apt modules, can be used.
Following the advice of https://github.com/ansible/ansible/issues/14468
Edited by Juande Santander-Vela