ansible 使用方法

免密钥方式登陆:

[root@yizhen ~]# ssh-keygen -t rsa
[root@yizhen ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.220.114

下面检查被控端是否被联通
[root@yizhen ~]# ansible all -m ping
192.168.220.114 | success >> {
    "changed": false,
    "ping": "pong"
}

192.168.220.116 | success >> {
    "changed": false,
    "ping": "pong"
}


 

posted @ 2016-04-13 09:57  BigBao的博客  阅读(231)  评论(0编辑  收藏  举报