ansible 主机清单 /etc/ansible/hosts

主机清单

[webservers]
ansible01
ansible02
ansible03
ansible04

  

 

[root@ftp:/root]
> ansible webservers -u root -k -m ping -o 
SSH password: 
ansible03 | SUCCESS => {"changed": false, "ping": "pong"}
ansible01 | SUCCESS => {"changed": false, "ping": "pong"}
ansible02 | SUCCESS => {"changed": false, "ping": "pong"}
ansible04 | SUCCESS => {"changed": false, "ping": "pong"}

[root@ftp:/root]
>

 

Ansible Inventory 内置参数





 

上一篇:想拿高薪的看过来


下一篇:leetcode题解--35. 搜索插入位置