On Sunday, March 10, 2013 11:31:49 AM UTC-5, mike wrote: > > Hello, > I change the sintax for my class and the instance for this inside site.pp > , but I still have problem when run the agent from node: > > [................] > > [root@nodo1 ~]# puppet agent --test --noop > Info: Retrieving plugin > Error: Could not retrieve catalog from remote server: Error 400 on SERVER: > Invalid parameter group at /etc/puppet/modules/users/manifests/init.pp:11 > on node nodo1.example.com > Warning: Not using cache on failed catalog > Error: Could not retrieve catalog; skipping run > > [................] > > My user manifests: > > [root@master ~]# cat /etc/puppet/modules/users/manifests/init.pp > define users::add_user ($user, $uid) { > > user { $user: > ensure => present, > home => "/home/${user}", > owner => $user, > group => $user, > mode => 0600, > uid => $uid, > gid => $uid, > } > > [...]
The User type has no property named 'group' (exactly as the error message says). See the type docs: http://docs.puppetlabs.com/references/3.1.latest/type.html#user. There is a property named 'groups' (note the 's'), but that is for specifying the user's *secondary* groups only. After removing that, you would find that the User type also does not have properties 'owner' or 'mode', so remove those, too. Next, you may notice that you are inconsistent in your naming. You declare a File["/home/$username"], but everywhere else the user name variable is spelled $user. This one could be insidious, as "/home/$username" probably becomes just "/home/", which exists, so you will manage a different directory than you intended to do. You may also trip over your wrong-direction relationship between User[$user] and Group[$user]. You need to apply the group first, because creating the user is likely to fail if the primary group to which you are assigning him does not already exist. You could change the 'require' in Group[$user] (only that one) to a 'before', but you could also just remove it, because Puppet will generate the correct relationship automatically in that particular case (see the "Autorequires" section in the type docs). John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.