All,
How can I stop the "returns successfully" messages from the exec {}
type unless their is a failure? Don''t really want to see it. Using
logoutput => on_failure with exec doesn''t seem to work (as this
person
says here
http://unimpressed.org/post/93835992/disabling-puppets-executed-successfully-emails).
I also tried that however, with:
exec {
"dummy-passwd-${name}":
command => "cat /etc/passwd | grep \"^${name}\"
>
/var/sftp/chroot/${name}/etc/passwd",
onlyif => "test /var/sftp/chroot/${name}/etc",
logoutput => on_failure,
tag => bitbucket;
}
Not knowing what tagmail.conf is all about since I can''t find it
documented anywhere, I tried putting a tagmail.conf in /etc/puppet on
the client with:
all, !bitbucket: myemail@somewhere
and no effect still.
Doug
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
> How can I stop the "returns successfully" messages from the exec {} > type unless their is a failure? Don''t really want to see it. Using > logoutput => on_failure with exec doesn''t seem to work (as this person > says herehttp://unimpressed.org/post/93835992/disabling-puppets-executed-succe...). > I also tried that however, with: > > exec { > "dummy-passwd-${name}": > command => "cat /etc/passwd | grep \"^${name}\" > > /var/sftp/chroot/${name}/etc/passwd", > onlyif => "test /var/sftp/chroot/${name}/etc", > logoutput => on_failure, > tag => bitbucket; > }Use ''unless'' instead of ''onlyif'' ... you want to run the command _unless_ the test returns positive (ie. the file exists). In your case, its running each time so the behaviour is correct (but not as you expect). You could also use ''creates'' instead: exec {"dummy-password-${name}": command => "cat /etc/passwd | grep \"^${name}\" > /var/sftp/chroot/$ {name}/etc/passwd", creates => "/var/sftp/chroot/${name}/etc" } Consult the reference docs for all the parameters and behaviour for exec: http://docs.puppetlabs.com/references/stable/type.html#exec ken. -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.