使用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