In regard to: [Puppet Users] Re: groups dependencies at user creation,...:

Thanks tim for answer me, The fact is $groups is an array, so when i
try something like this

------
           Group[$groups] -> User[$username]

           user { $username:
                   comment => "$email",
                   home    => "/home/$username",
                   shell   => "/bin/bash",
                   password => "!!",
                   groups  => $groups
           }

------

I'd got :

err: Could not retrieve catalog from remote server: Error 400 on
SERVER: Could not find resource 'Group[sudo]Group[admin]Group[deploy]'
for relationship on 'User[ppuser7]' on node casa

I was afraid that might be the case, but thought it was worth a try.

Does this work better:

        $groups_as_array = split($groups, ',')
        Groups[$groups_as_array] -> User[$username]

?  I have my doubts, but it's what I would try next.

Note that split() is part of the default set of functions that are part
of puppet.  For more info on functions, see

        http://docs.puppetlabs.com/references/stable/function.html

Tim
--
Tim Mooney                                             tim.moo...@ndsu.edu
Enterprise Computing & Infrastructure                  701-231-1076 (Voice)
Room 242-J6, IACC Building                             701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to