Re: [Puppet Users] per environment tagmail settings?

Dan Bode
Wed, 16 Dec 2009 23:18:06 -0000

Hi,

Is it possible to disable tagmail reports for one environment but
not
> another?  For example, when I run ''puppetd --test --
> environment=testing'', I do not want to receive an email.  I tried
> adding "!testing" to to tagmail.conf, but that didn''t
work.
>

you can access a hosts environment (on its current run) in the following
file (on the puppet server):

  $vardir/yaml/node/HOST.yaml

 You could use this information to customize any of the reports if you need
extra filtering based on environment.
  they can be found at:
/usr/lib/ruby/site_ruby/1.8/puppet/reports/


> Alternatively, I would like to add a statement to the top of the
> reports that would state the environment, but I''m not sure how to
do
> that. It looks like most of the puppet functions for logging (err,
> alert, critical, etc.) log to the server not the client
>

again, this would require customizing the reports.

hope this help,

Dan Bode