ansible /usr/bin/python: not found

  使用ansible命令的时候出错python

ansible all -m ping

  出现报错spa

192.168.199.154 | FAILED! => {
    "changed": false, 
    "module_stderr": "/bin/sh: 1: /usr/bin/python: not found\n", 
    "module_stdout": "", 
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", 
    "rc": 127
}

  检查了一下执行ansible命令的主机已经装了python,那怎么提示not found?code

  最终找到缘由时它在其余节点上也是依赖python的,因此其余节点上也要安装pythonblog

apt-get install python2.7
# Ubuntu16.04可能须要配置如下软链接
ln -s /usr/bin/python2.7 /usr/bin/python
相关文章
相关标签/搜索