-3
FAILED! => {
  "changed": false,
  "failed": true,
  "module_stderr": "Shared connection to 10.13.5.4 closed.\r\n",
  "module_stdout": "/bin/sh: /usr/bin/python:  not found.\r\n",
  "msg": "MODULE FAILURE",
  "rc": 0
zigarn
  • 10,892
  • 2
  • 31
  • 45
Prabhakaran V
  • 11
  • 1
  • 4
  • 2
    There is an error message for you "/bin/sh: /usr/bin/python: not found." – Konstantin Suvorov Jun 29 '17 at 10:25
  • i installed ansible in redhat machine from i trying getting some information some HP unix server i am facing error like :- /bin/sh: /usr/bin/python: not found . my question is now i need to install python deps in all HP unix machine?... – Prabhakaran V Jun 30 '17 at 12:10

1 Answers1

1

The message is pretty clear: /bin/sh: /usr/bin/python: not found.

As specified in the documentation, Ansible needs to have python installed on the managed nodes.

You can install it with ansible by using the raw module in a first task:

- name: Install python
  raw: yum install -y python # adapt to use the right package manager and package name
  become: yes

You can also install it with adhoc command:

ansible myhost --sudo -m raw -a "yum install -y python"
zigarn
  • 10,892
  • 2
  • 31
  • 45
  • 1
    I wonder how do you know `yum` is available and working on OP's "hp unix server"... – techraf Jun 29 '17 at 12:47
  • I don't, it's an example and it's said to adapt to the package manager (I don't know what it is on hp unix) – zigarn Jun 29 '17 at 12:50
  • i installed ansible in redhat machine from i trying getting some information some HP unix server i am facing error like :- /bin/sh: /usr/bin/python: not found . my question is now i need to install python deps in all HP unix machine . – Prabhakaran V Jun 30 '17 at 12:08
  • Yes: python is required on all managed hosts, not only the ansible host. – zigarn Jun 30 '17 at 12:34