Created
April 25, 2012 11:04
-
-
Save raphink/2488967 to your computer and use it in GitHub Desktop.
onlyif not honored in Exec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exec {'Avoid multiple mcollectived': | |
path => '/usr/bin:/usr/sbin:/bin', | |
command => 'pkill -f mcollectived', | |
onlyif => 'test `pgrep -f mcollectived | wc -l` -gt 1', | |
notify => Service['mcollective'], | |
} |
this now works:
class perdition::service::xinetd
{
exec {
'killperditiondaemon':
path => '/usr/bin',
command => 'pkill -f "[p]erdition.*: daemon"',
onlyif => 'pgrep -f "[p]erdition.*daemon"';
}
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
which version of puppet? I think I'm seeing the same 2.7.6