-2

getting below error while executing 'ansible all -m ping'

user@user-VirtualBox:/etc/ansible$ ansible all -m ping

ip-address | FAILED! => {
    "changed": false,
    "module_stderr": "Shared connection to ip-address closed.\r\n",
    "module_stdout": "/bin/sh: 1: /usr/bin/python: not found\r\n",
    "msg": "MODULE FAILURE",
    "rc": 127
}
Nanda Thota
  • 322
  • 3
  • 10
  • Does this answer your question? [Ansible fails with /bin/sh: 1: /usr/bin/python: not found](https://stackoverflow.com/questions/32429259/ansible-fails-with-bin-sh-1-usr-bin-python-not-found) – mdaniel Sep 23 '20 at 16:10

1 Answers1

2

This issue resolved after installed python on a remote server

connect with ssh and install python

ssh -i ec2-ssh.pem ubuntu@10.120.30.20

sudo apt install python

Nanda Thota
  • 322
  • 3
  • 10
  • Rather than doing that one-off thing, you can also use `raw:` to correctly detect if python is already installed and similarly use `raw:` to install it ; that way, none of your colleagues will have to come to SO to ask duplicated questions in the future – mdaniel Sep 23 '20 at 16:12