Randall Hansen wrote:

Is the "resources" type primarily useful for purging?  Is it also
commonly used for metaparameters?  The documentation[1] says this, but
I haven't used it much myself, and I don't know what common use is.

I get the impression you are confused about what the part about
metaparameters in the documentation actually means.  If you use
a metaparameter (like 'noop' or 'loglevel') in a "resources"
declaration, they will apply to that particular purging; they
won't apply to normal declarations for that type.

Assume for example that you have the following manifest:

    resources {
        "user":
            purge => true, noop => true, loglevel => crit;
    }
    user {
        "randall":
            uid => 4711, ensure => present;
    }

The 'noop' and 'loglevel' parameters will not apply to the
"randall" user.  What happens, is that when Puppet is run,
it will check which users exist on the system; let's assume
it finds the users "root", "apache" and "randall" (i.e., your
account has already been created).  Internally, Puppet will
generate the following extra resource declarations:

    user {
        [ "root", "apache" ]:
            ensure => absent, noop => true, loglevel => crit;
    }

Since you have explicitly managed the "randall" user, that
will not be included in those extra generated resources.  So
the total list of resources that will be applied will be:

    user {
        [ "root", "apache" ]:
            ensure => absent, noop => true, loglevel => crit;
    }
    user {
        "randall":
            uid => 4711, ensure => present;
    }

And as you see, the "randall" declaration does not have any
noop or loglevel metaparameters.


Does this help your understanding?


        /Bellman

--
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