Mohamed Lrhazi wrote:

Thanks a lot guys... but how do I do this, both silencing reporting
and overriding noop mode, for a resource other than "exec"... mine is:

file {
    "/etc/puppet/facts.yaml":
      ensure => file,
      content => inline_template("<%= scope.to_hash.reject { |k,v| !(
k.is_a?(String) && v.is_a?(String) ) }.to_yaml %>"),
  }

There is a metaparameter called 'loglevel'.  If you set that
to something lower than "notice" (i.e. either "info" or "debug"),
then Puppet won't report that it applied the resource:

    file {
        "/etc/puppet/facts.yaml":
            ...,
            loglevel => debug, noop => false;
    }


Myself, I do somewhat the opposite: I also run Puppet from cron,
but not in noop mode.  Since I'm not interrested in getting dozens
or hundreds of mails every time I make a configuration change, I
filter away all the notice messages, with a simple grep:

    puppetd ... | egrep -v '^notice:'

However, on one resources I set 'loglevel => warning', so I get
a warning message whenever Puppet fixes that particular resource,
because when that situation happens I want to check manually that
it was the correct action to take.  (Specifically, in grub.conf
I set the parameter 'default' to 0 so it will always default to
boot the first kernel.  I do this since I have sometimes found
that after installing a new kernel, grub.conf still defaulted to
boot the old kernel.  But I don't yet quite trust that setting
default=0 will always be the right thing.)


        /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-us...@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