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