【问题标题】:"module_stdout": "/bin/sh: 1: /usr/bin/python: not found\r\n" when i use 'ansible all -m ping'"module_stdout": "/bin/sh: 1: /usr/bin/python: not found\r\n" 当我使用 'ansible all -m ping'
【发布时间】:2021-01-09 17:08:14
【问题描述】:

执行“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
}

【问题讨论】:

标签: ansible


【解决方案1】:

在远程服务器上安装 python 后这个问题解决了

通过 ssh 连接并安装 python

ssh -i ec2-ssh.pem ubuntu@10.120.30.20

sudo apt install python

【讨论】:

  • 您也可以使用raw: 来正确检测是否已经安装了python,并类似地使用raw: 来安装它,而不是做那种一次性的事情;这样,您的同事以后都不必来 SO 提出重复的问题
猜你喜欢
  • 2015-12-02
  • 2015-12-18
  • 2020-08-11
  • 2018-06-06
  • 2021-10-20
  • 2019-09-11
  • 1970-01-01
  • 2020-07-28
  • 1970-01-01
相关资源
最近更新 更多