From 4ed971574f3c181c4a65bc746ffee7fcbf6b9ef6 Mon Sep 17 00:00:00 2001 From: Stephen Fromm Date: Wed, 28 Mar 2012 14:24:13 -0700 Subject: [PATCH] Update user_commands playbook with supplementary group examples --- examples/playbooks/user_commands.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/examples/playbooks/user_commands.yml b/examples/playbooks/user_commands.yml index 07e4c167bf..596bbc6485 100644 --- a/examples/playbooks/user_commands.yml +++ b/examples/playbooks/user_commands.yml @@ -13,11 +13,26 @@ # Walk through account creation, modification, and deletion - name: test basic user account creation - action: user name=tset comment=TsetUser group=100 shell=/sbin/nologin createhome=no + action: 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 + - action: user name=tset password=$password supplementary + + # 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 + + # Add the user to the groups dialout and wheel, + # This will remove tset from the group uucp. + - action: 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 + + # Finally, remove the user. - action: user name=tset state=absent