On Thu, May 12, 2011 at 5:13 AM, Silviu Paragina <sil...@paragina.ro> wrote:
> On 11.05.2011 18:06, Calum wrote:
>>
>> On 11 May 2011 15:49, Ohad Levy<ohadl...@gmail.com>  wrote:
>>>
>>> You can use tagmail report, or use something like foreman to do it for
>>> you.
>>> Ohad
>>
>> Thanks - I'll look into those.
>>
>> I was more meaning something like:
>>
>> file { "/etc/ntp.conf":
>>                 owner   =>  root,
>>                 group   =>  root,
>>                 mode    =>  644,
>>                 source  =>  "puppet:///modules/ntp/ntp.conf.2011-05-06",
>>                 require =>  Package["ntp"],
>>                 onchange =>  exec("mail ....."),
>>         }
>>
>> or something like that.
>>
> You almost gave yourself the answer. :) Check the refreshonly parameter for
> the exec type ;)
> But this seems more of a hack to me, so take it as you wish.
>

Back to Ohad's recommendation. If you have several resources that you
need to receive email alerts upon resource changes, use tagmail report
functionality.

1. Add the metaparameter tag => send_me_email (or any arbitrary set of
tag values) to the resource you want to monitor via email.
2. Enable reports = tagmail in puppet.conf [master] section,
3. In in tagmap conf set tag and email address: send_me_email: admin@...

Thanks,

Nan

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