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