On Wed, Mar 31, 2010 at 6:30 PM, Darvin Denmian <[email protected]>wrote:

> Hello,
>
> I have the following define:
>
> define adduser ($shell, $group, $fullname, $ingroups = "none", $home =
> "none") {
>   user { "$name":
>      ensure => present,
>      comment => "$fullname",
>      gid => "$group",
>      groups => "$ingroups",
>      membership => minimum,
>      shell => "$shell",
>      home => "$home",
>      require => Group[$group]
>   }
> }
>
> and the following "call" for this define:
>
> adduser {
>   "teste" :
>   shell => "/bin/bash", group => "teste",fullname => "teste
> Workgroup",ingroups => "admin"
> }
>
> and ..... the following error:
>
> err: Could not run Puppet configuration client: Could not find
> dependency Group[teste] for User[teste] at
> /etc/puppet/modules/sysadmin/manifests/init.pp:13
>
> Can somebody help me with this error?
>
> Thanks !
>
>
Dependencies for groups are implicit when they are listed with a user, so
what you have for $ingroups (I could be wrong here), should cover you and
you won't need the require.

However, where's the group, right?

You will not be able to reference an explicit dependency unless somewhere in
your configuration you are declaring the Group.   In the above example, you
don't have the Group declared, so most likely it is not present, hence the
problem.

I may be lacking some additional context, but from what you've shared, that
looks like the problem to me.

--Michael

=

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

Reply via email to