應用
管理遠程主機上的組
參數
- name:指定組的名稱
- state present|absent:指定組的狀態
- gid:指定組的gid
示例
- 創建test組
]# ansible all -m group -a 'name=test'
- 刪除test組,前提是不能有用戶把刪除的組塗當成主組
]# ansible all -m group -a 'name=test state=absent'
- 將test組的gid設置為2000
]# ansible all -m group -a 'name=test gid=2000'