ansible-group模塊使用方法


應用

管理遠程主機上的組

參數

  • name:指定組的名稱
  • state present|absent:指定組的狀態
  • gid:指定組的gid

示例

  1. 創建test組
]# ansible all -m group -a 'name=test'
  1. 刪除test組,前提是不能有用戶把刪除的組塗當成主組
]# ansible all -m group -a 'name=test state=absent'
  1. 將test組的gid設置為2000
]# ansible all -m group -a 'name=test gid=2000'


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM