Hi,
On Wed, 2010-04-14 at 14:22 -0700, Jim Bala wrote:> If I understand the docs correctly, the ''require'' inside
this define
> should be satisfied before ''User'' is evaluated. Except
that''s not
> what''s happening; instead, ''User'' is being
evaluated first and then
> the require is being satisfied.
>
> Am I missing/misunderstanding something about how this should work?
I think the issue is with the collection of virtual resource.
> Context: Using ssh::auth, when a user account is to be made
''absent''
> one needs to delete the ssh key-pair before the user account is
> deleted, else the ssh::auth commands fail due to unknown user.
> ssh::auth requires the user be realized first, so I''ve
intentionally
> removed ''ensure'' from the users.pp file in order to
manipulate that
> attribute separately. (All users are virtual, as well.) The idea
> here is to cause the ssh::auth ''delete'' commands to
happen first, then
> realize the user with ensure explicitly set to ''absent''
(whereas
> before it was implicitly set to ''present'').
>
> There''s more detail I could provide but first I just wanted to see
if
> I''m misunderstanding the order of evaluation I should expect.
>
> -Jim
>
>
> site.pp:
> define nukeuser ($ensure = ''absent'') {
> require users::admin::absent
> User <| title == $title |> { ensure =>
''absent'' }
Does it work better it you use:
User <| title == $title |> { ensure => ''absent'',
require => Class["users::admin::absent"] }
and you remove the require line?
Basically the require function adds a require link between the current
class and the required class. Since it is used in a definition, I''m not
sure what it does exactly (definition are some kind of special things).
> [snipped]
--
Brice Figureau
Follow the latest Puppet Community evolutions on www.planetpuppet.org!
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.