View Full Version : [SOLVED] puppet: manage puppetd with puppet itself
surfer
September 7th, 2010, 10:33 AM
i need to change /etc/default/puppet for my puppet (http://www.puppetlabs.com/) clients during the setup of my installation. i wrote a puppet class that checks for changes of the file on the server and restarts puppetd if necessary.
unfortunately: puppet stops puppetd first and does not get to restart it, as the puppet daemon is... well... stopped.
so i shut myself out of all this nice puppetry.
any ideas for a workaround?
surfer
September 7th, 2010, 11:05 AM
i seem to have found a workaround for that:
i just call something like
exec{
"restart_puppet":
path => "";
command => "/usr/bin/service puppet restart"
}
whenever the file changes.
surfer
September 7th, 2010, 01:35 PM
hmm. no, this does not really work either...
surfer
September 7th, 2010, 02:29 PM
ok, got it:
the parameters in /etc/default/puppet are passed to the command line and override everything that is in the config file /etc/puppet/puppet.conf.
so i remove all the options in /etc/default/puppet and just use /etc/puppet/puppet.conf as configuration.
that way i can change parameters in puppet.conf and send a HUP signal to the puppetd process:
$ sudo pkill -HUP puppetd
this forces the daemon to reread its configuration.
just in case anybody cares... talking to myself here...
surfer
September 7th, 2010, 03:52 PM
once again: no! this does not work. seems to be a bug (http://projects.puppetlabs.com/issues/show/793).
i give up and manage puppetd with cron.
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.