ansible模块--groups模块

网友投稿 578 2022-10-10

ansible模块--groups模块

ansible模块--groups模块

group组模块,创建组,管理组name:指定组gid:指定gidstate=absent 删除指定组1.创建组并指定gid

[root@ansible ansible]# ansible -i hosts mysql -m group -a 'name=group1 gid=5000'192.168.56.88 | CHANGED => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed": true, "gid": 5000, "name": "group1", "state": "present", "system": false}

2.删除组

[root@ansible ansible]# ansible -i hosts mysql -m group -a 'name=group1 state=absent'192.168.56.88 | CHANGED => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed": true, "name": "group1", "state": "absent"}

ansible

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:ansible模块--user模块
下一篇:微信小程序实现保险产品商城(车险小程序)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~