|
|
|
@ -13,26 +13,26 @@ |
|
|
|
|
|
|
|
|
|
# Walk through account creation, modification, and deletion |
|
|
|
|
- name: test basic user account creation |
|
|
|
|
action: user name=tset comment=TsetUser group=users shell=/sbin/nologin createhome=no |
|
|
|
|
user: name=tset comment=TsetUser group=users shell=/sbin/nologin createhome=no |
|
|
|
|
|
|
|
|
|
# the following is just a simple example of how you don't have to include |
|
|
|
|
# the 'name' element for each task |
|
|
|
|
|
|
|
|
|
- action: user name=tset comment=NyetUser |
|
|
|
|
- action: user name=tset password={{password}} |
|
|
|
|
- user: name=tset comment=NyetUser |
|
|
|
|
- user: name=tset password={{password}} |
|
|
|
|
|
|
|
|
|
# The following will add the user to supplementary groups. |
|
|
|
|
|
|
|
|
|
# Add the user to the groups dialout and uucp. |
|
|
|
|
- action: user name=tset groups=dialout,uucp |
|
|
|
|
- user: name=tset groups=dialout,uucp |
|
|
|
|
|
|
|
|
|
# Add the user to the groups dialout and wheel, |
|
|
|
|
# This will remove tset from the group uucp. |
|
|
|
|
- action: user name=tset groups=dialout,wheel |
|
|
|
|
- user: name=tset groups=dialout,wheel |
|
|
|
|
|
|
|
|
|
# Add the user to the group uucp. Because append=yes, the user |
|
|
|
|
# will not be removed from the groups dialout and wheel. |
|
|
|
|
- action: user name=tset groups=uucp append=yes |
|
|
|
|
- user: name=tset groups=uucp append=yes |
|
|
|
|
|
|
|
|
|
# Finally, remove the user. |
|
|
|
|
- action: user name=tset state=absent |
|
|
|
|
- user: name=tset state=absent |
|
|
|
|