- Ansible is an IT automation tool. It can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates.
Telling Ansible where Python is located
Ansible requires Python on the target machine, Python 3 is supported as a preview  but might not work for all modules. By default Ansible assumes it can find a
/usr/bin/python on your remote system that is a 2.X or 3.X version of Python, specifically 2.4 or higher.
If some of your modules requires Python 2 you need to tell Ansible where to find Python 2 by setting the
ansible_python_interpreter variable in your Ansible inventory file. This can be done succinctly by using host groups in the inventory:
[archlinux] server1 server2 [debian] server3 [archlinux:vars] ansible_python_interpreter=/usr/bin/python2