diff --git a/puppet/manifests/init.pp b/puppet/manifests/init.pp index 1c9c783..4a77a4c 100644 --- a/puppet/manifests/init.pp +++ b/puppet/manifests/init.pp @@ -75,11 +75,11 @@ class puppet::client { enable => true, status => $::puppetversion ? { /^[0-2]\./ => "pgrep -f /usr/local/sbin/puppetd", - default => "pgrep -f /usr/local/bin/puppet", + default => "pgrep -f '/usr/local/bin/puppet agent'", }, restart => $::puppetversion ? { /^[0-2]\./ => "pkill -HUP -f /usr/local/sbin/puppetd", - default => "pkill -HUP -f /usr/local/bin/puppet", + default => "pkill -HUP -f '/usr/local/bin/puppet agent'", }, subscribe => File["/etc/puppet/puppet.conf"], } @@ -88,7 +88,10 @@ class puppet::client { service { "puppet": ensure => running, enable => true, - restart => "/usr/bin/pkill -HUP puppetd", + restart => $::puppetversion ? { + /^0\./ => "pkill -HUP puppetd", + default => "pkill -HUP -f '/usr/bin/puppet agent'", + }, subscribe => File["/etc/puppet/puppet.conf"], } file { "/etc/default/puppet": @@ -104,7 +107,10 @@ class puppet::client { service { "puppet": ensure => running, enable => true, - restart => "/usr/bin/pkill -HUP puppetd", + restart => $::puppetversion ? { + /^[0-2]\./ => "pkill -HUP puppetd", + default => "pkill -HUP -f '/usr/bin/puppet agent'", + }, subscribe => File["/etc/puppet/puppet.conf"], } }