Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use puppet to manage linux servers and various services. It works well, except for the puppet service itself.

My puppet class is like this :

class puppet {
  file { "/etc/puppet/puppet.conf":
    owner  => 0, group  => 0, mode => 0644,
    content => template("${module_name}/puppet.conf.erb"),

  service { "puppet":
    name       => "puppet",
    ensure     => running,
    enable     => true, hasstatus  => true, hasrestart => true,
    require    => File["/etc/puppet/puppet/conf"]
    subscribe  => File["/etc/puppet/puppet/conf"]


When a change is applied on /etc/puppet/puppet.conf, puppet notices that it needs to restart puppet service and so, crash itself :

Mar 30 17:08:23 XXXX puppet-agent[20172]: (/Stage[main]/Puppet/File[/etc/puppet/puppet.conf]/content) content changed '{md5}eeaf5dfc7d88c8d9c85e6a8cc714d702' to '{md5}ef6ff0e423f4125e24b689980df9f71d'
Mar 30 17:08:23 XXXX puppet-agent[20172]: Caught TERM; calling stop

Do you know how I could update puppet.conf correctly with puppet ?

share|improve this question
up vote 10 down vote accepted

The puppet daemon will automatically notice changes to the puppet.conf file without needing to be restarted. Simply remove the subscribe => File["/etc/puppet/puppet.conf"] from service { "puppet" ... } and everything will still work.

Puppet can't really ensure => running for itself, either. Using something like the Mutal Restart with puppet ensuring cron is running and a cronjob ensuring puppet is running will work, however.

share|improve this answer
I'll check if it works on monday, but it seems very good to me. Thanks for the pointer about Mutual Restart. – Coren Mar 31 '12 at 9:43

One solution is to not run puppet as a daemon, but invoke it from cron. This something that many people prefer because for them, the daemon consumes a lot of memory.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.