Add playbook to demonstrate use of group module
This commit is contained in:
parent
db677954ac
commit
b373c6c223
1 changed files with 20 additions and 0 deletions
20
examples/playbooks/group_commands.yml
Normal file
20
examples/playbooks/group_commands.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
# This is a demo of how the group command works.
|
||||||
|
|
||||||
|
- hosts: all
|
||||||
|
user: root
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
# Walk through group creation, modification, and deletion
|
||||||
|
- name: create a group
|
||||||
|
action: group name=tset
|
||||||
|
|
||||||
|
- name: add a member to tset
|
||||||
|
action: group name=tset member=nobody memberstate=present
|
||||||
|
|
||||||
|
- name: remove member
|
||||||
|
action: group name=tset member=nobody memberstate=absent
|
||||||
|
|
||||||
|
- name: remove group
|
||||||
|
action: group name=tset state=absent
|
Loading…
Reference in a new issue