Ansible 管理服务和软件

[root@Ansible ~]# ansible RAC -m yum -a 'name=iscsi-initiator-utils state=installed'
RAC_Node1 | success >> {
"changed": false, 
"msg": "", 
"rc": 0, 
"results": [
"iscsi-initiator-utils-6.2.0.873-13.el6.x86_64 providing iscsi-initiator-utils is already installed"
]
}

RAC_Node2 | success >> {
"changed": false, 
"msg": "", 
"rc": 0, 
"results": [
"iscsi-initiator-utils-6.2.0.873-13.el6.x86_64 providing iscsi-initiator-utils is already installed"
]
}

[root@Ansible ~]# ansible RAC -m service -a 'name=iscsi state=restarted'
RAC_Node1 | success >> {
"changed": true, 
"name": "iscsi", 
"state": "started"
}

RAC_Node2 | success >> {
"changed": true, 
"name": "iscsi", 
"state": "started"
}

 

导读:http://www.ithov.com/linux/136836.shtml

posted @ 2015-05-07 16:58  艾阳君  阅读(163)  评论(0编辑  收藏  举报