Very Very New to Ansible

Hello Everyone

I built my control machine on a VM w/Ubuntu Server 18.04.4 and ansible 2.5.1. Mind you I am just learning so the version shouldn’t matter that much. I built my first and second target machines and I am testing the ansible ad-hoc commands.

When I do an ansible miscservers -m ping I get the following:

$ ansible miscservers -m ping
xxx.xxx.xx.x | FAILED! => {
“changed”: false,
“module_stderr”: “Shared connection to xxx.xxx.xx.x closed.\r\n”,
“module_stdout”: “/bin/sh: 1: /usr/bin/python: not found\r\n”,
“msg”: “MODULE FAILURE”,
“rc”: 127
}
xxx.xxx.x.xx | SUCCESS => {
“changed”: false,
“ping”: “pong”
}

I do not know what to look for here to try and resolve this issue. Please may I get some ideas,

Thanks,
Michael

Hi

What OS is the first machine in that play?
It doesn’t have python installed or more likely ansible cannot see it.

You can set the python path for the machine in the inventory. But it would be would making sure it is installed on the off chance it is not.

There is more under client requirements here.

https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#managed-node-requirements

As per “module_stdout”

Is python installed on the target?