Multiple environments and mail

26 views
Skip to first unread message

Robert Scheer

unread,
Jun 18, 2010, 1:34:13 PM6/18/10
to puppet...@googlegroups.com
To facilitate developing, testing and releasing puppet code, we use
different environments. That works very well. The only problem is that
I cannot prevent puppet from mailing a report, nor direct it somewhere
else, when using a different environment.

The file /etc/puppet/puppet.conf on the puppetmaster looks like this:
------
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/etc/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
pluginsync=true
templatedir=$confdir/templates
color=false

[puppetmasterd]
autosign=false
verbose=true
reports=log,store,tagmail

[userxxx]
manifestdir=/usr/home/userxxx/svn/puppet/manifests
manifest=/usr/home/userxxx/svn/puppet/manifests/site.pp
modulepath = /usr/home/userxxx/svn/puppet/modules

[useryyy]
manifestdir=/usr/home/useryyy/svn/puppet/manifests
manifest=/usr/home/useryyy/svn/puppet/manifests/site.pp
modulepath=/usr/home/useryyy/svn/puppet/modules
------


The file /etc/puppet/tagmail.conf contains:
------
all: admins@ourdomain
------


The line "reports=log,store,tagmail" under [puppetmasterd] is what we want
for production: if something changes, then admins@ourdomain get a puppet
report. So far so good.

Now userxxx is has written a new module and is testing his code on a
node called testbox. He runs: "puppetd --environment=userxxx --debug".
This generates a puppet report to admins@ourdomain. But the admins do
not want to receive this report every time somebody else tests his/her
code. Of course every admin could filter away these mails, but that
is not a real solution.

Adding the option --report=false to puppetd has no effect.
Adding "report=false" to [userxxx] has no effect.
Adding "reports=log" to [userxxx] has no effect.
Adding "tagmap=/usr/home/userxxx/svn/puppet/tagmail.conf" to [userxxx] has
no effect. The new tagmap (with another address in it) is completely
ignored. Puppet still looks for /etc/puppet/tagmail.conf

Is this a bug or am I doing something wrong here?
We are using puppet 0.25.4 on both the master and client nodes.


Robert Scheer
XS4ALL System Administration

Nigel Kersten

unread,
Jun 18, 2010, 2:18:04 PM6/18/10
to puppet...@googlegroups.com

Have you tried --no-report ?

> Adding "report=false" to [userxxx] has no effect.
> Adding "reports=log" to [userxxx] has no effect.
> Adding "tagmap=/usr/home/userxxx/svn/puppet/tagmail.conf" to [userxxx] has
> no effect. The new tagmap (with another address in it) is completely
> ignored. Puppet still looks for /etc/puppet/tagmail.conf
>
> Is this a bug or am I doing something wrong here?
> We are using puppet 0.25.4 on both the master and client nodes.

This could be a bug, I don't use tagmail reports, but it just hit me
that it's probably reasonable for --test to imply --no-report as well
as the other things it implies.

>
>
> Robert Scheer
> XS4ALL System Administration
>

> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>
>

--
nigel

Joe McDonagh

unread,
Jun 18, 2010, 2:39:38 PM6/18/10
to puppet...@googlegroups.com
On 06/18/2010 02:18 PM, Nigel Kersten wrote:
> On Fri, Jun 18, 2010 at 10:34 AM, Robert Scheer<r...@xs4all.net> wrote:
>
>> To facilitate developing, testing and releasing puppet code, we use
>> different environments. That works very well. The only problem is that
>> I cannot prevent puppet from mailing a report, nor direct it somewhere
>> else, when using a different environment.
>>
Unfortunately, tagmail does not do per-environment settings. I put in a
feature request for this a while ago, go thumbs it up!

--
Joe McDonagh
AIM: YoosingYoonickz
IRC: joe-mac on freenode
"When the going gets weird, the weird turn pro."

Robert Scheer

unread,
Jun 19, 2010, 7:00:19 AM6/19/10
to puppet...@googlegroups.com
On Fri, Jun 18, 2010 at 11:18 -0700, Nigel Kersten wrote:

> Have you tried --no-report ?

That works! Because other long options work as --key=value,
I never expected --report=false not to work. Thanks!

> This could be a bug, I don't use tagmail reports, but it just hit me
> that it's probably reasonable for --test to imply --no-report as well
> as the other things it implies.

Agreed.


Regards,
Robert Scheer

Reply all
Reply to author
Forward
0 new messages