ansible /usr/bin/python: not found


  使用ansible命令的时候出错

ansible all -m ping

  出现报错

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?

  最终找到原因时它在其他节点上也是依赖python的,所以其他节点上也要安装python

apt-get install python2.7
# Ubuntu16.04可能需要配置以下软连接
ln -s /usr/bin/python2.7 /usr/bin/python

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM