On Wed, May 18, 2011 at 10:26 PM, Kent <[email protected]> wrote:
> I too am having problems with using stages while managing the root
> user in a resource. The errors I am getting which spit out the
> resource relationships reflect a <pre_stage_resource> => User[root]
> and User[root] => <pre_stage_resource> pair.
>
> There must be something implicit about managing user "root" such that
> nearly all other resources depend on it. I suppose this can be gotten
> around by managing the root user's properties in other ways (i.e. with
> nasty execs and what not), but I think it's reasonable to expect that
> many Puppet users, like myself and those in this thread, would like to
> use a normal User resource in keeping with Puppet principles.
If a file is owned by a user/group and that user/group resource is
declared, then there's an implicit dependency. So
file { '/foo":
require => file,
owner => root,
# implies require => User['root'] if root user resource is declared.
}
> Another solution I guess is to always put the root user resource in
> the earliest stage -- probably what I will end up doing. For that
> matter, one's entire user/account class may be put in the pre stage.
So yes you can use a normal puppet resource for root, but root user
should be in the first stage.
Nan
--
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.