In a recent post Nikola Petrov summerized methods for managing config
files such as puppet.conf:

* use augeas with virtual resources
* use the concat module
* use the standard template function with multiple arguments; look at
http://docs.puppetlabs.com/guides/templating.html and scroll down to
"Combining templates"

I can add a few others:

* use the ini_setting type puppetlabs/inifile
* tweek startup process of puppet master to use alternate config file
* append templates for agent and master in a puppet server class

We are an ingenious community. I'm sure there are even more solutions
in circulation. But none of these are trivial, and definitely not
newbie friendly. They are all created out of struggle and pain, because
for every server enhancement (storeconfigs, dashboard, puppetdb, etc.)
we have to docter our puppet.conf management method to accomodate some
additional options which really ought to be managed within an
enhancement specific class.

This makes it especially hard to make use of puppet forge modules. For
example, it is not possible to combine puppetlabs/puppetdb with
example42/puppet without major revisions. puppetlabs uses inifile.
example42 uses template.

But why so many methods? Why is there not a single recommended best
practice method for managing puppet.conf?

ANSWER: Because puppet.conf lacks an include statement.


# puppet.conf
logdir = /var/log/puppet
rundir = /var/run/puppet
confdir = /etc/puppet
environment = test
include $confdir/conf.d/main/*

classfile = $vardir/classes.txt
localconfig = $vardir/localconfig
ca_server = puppet.blee.edu
server = puppet.blee.edu
include $confdir/conf.d/agent/*

ca_server = puppet.blee.edu
server = puppet.blee.edu
include = $confdir/conf.d/master/*

include $confdir/conf.d/environments/*
# end puppet.conf

ls -1 /etc/puppet/conf.d/master

Sorry for the rant. I'm sure the above suggestion would have issues
too. I'm now on my 3rd major overhaul of our puppet infrastructure
classes solely because of this one file. I refuse to believe this is a
conspiricy just to get us to purchase PE. But there must be a better



Did you try poking at it with a stick?

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.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 4 | next ›
Discussion Overview
grouppuppet-users @
postedJan 17, '13 at 10:14p
activeJan 19, '13 at 6:11p



site design / logo © 2021 Grokbase