ping模块
ping 模块,这个很好理解,跟我们常用的 ping 命令是一样的,用来检测与目标主机的连通性
[root@master ~]# ansible 192.168.142.45 -m ping 192.168.142.45 | SUCCESS => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed": false, "ping": "pong" } [root@master ~]# ansible -m ping all 192.168.142.45 | SUCCESS => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed": false, "ping": "pong" } 192.168.142.51 | SUCCESS => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed": false, "ping": "pong" }
如果能够 ping 通,那么结果字体是显示绿色,反之黄色
标签:常用,false,python,ping,192.168,discovered,Ansible,模块,ansible From: https://www.cnblogs.com/joyware/p/17390550.html