在运行这个...
$ ansible all -m ping
Run Code Online (Sandbox Code Playgroud)
我得到这个...
[WARNING]: sftp transfer mechanism failed on [test@172.31.48.154]. Use ANSIBLE_DEBUG=1 to see detailed information
[WARNING]: scp transfer mechanism failed on [test@172.31.48.154]. Use ANSIBLE_DEBUG=1 to see detailed information
test@172.31.48.154 | FAILED! => {
"failed": true,
"msg": "failed to transfer file to /home/test/.ansible/tmp/ansible-tmp-148610479.7-240708330710714/ping.py:\n\nssh: Could not resolve hostname 172.31.48.154]:Name or service not known\r\nlost connection\n"
}
localhost | SUCCESS => {
"changed": false,
"ping": "pong"
}
Run Code Online (Sandbox Code Playgroud)