Scott wrote:
> Is anyone using multiple environments? Can someone at least tell me
> what they did to get it working?
I do. My puppet.conf on the master looks like this:
--- puppetmaster:/etc/puppet/puppet.conf -------------------------------
[main]
vardir = /var/lib/puppet
logdir = /var/log/puppet
rundir = /var/run/puppet
ssldir = $vardir/ssl
[puppetd]
vardir=/var/lib/puppet
logdir=/var/log/puppet
rundir=/var/run/puppet
ssldir=$vardir/ssl
color=false
server=jolokia.nsc.liu.se
pluginsync=true
report=true
runinterval=14400
splay=true
splaylimit=305
usecacheonfailure=false
classfile = $vardir/classes.txt
localconfig = $vardir/localconfig
[puppetmasterd]
manifestdir=/dev/null
manifest=/dev/null/site.pp
libdir=/config/e/production/modules/nsc-puppet-utils/plugins
vardir=/var/lib/puppet
logdir=/var/log/puppet
rundir=/var/run/puppet
ssldir=$vardir/ssl
[production]
manifestdir=/config/e/production/manifests
manifest=/config/e/production/manifests/site.pp
modulepath=/config/e/production/modules
[bellman]
manifestdir=/config/e/bellman/manifests
manifest=/config/e/bellman/manifests/site.pp
modulepath=/config/e/bellman/modules
------------------------------------------------------------------------
On the clients, I run puppetd from cron like this:
/usr/sbin/puppetd --onetime --no-splay --color=false \
--logdest=console --no-usecacheonfailure \
--no-daemonize --pluginsync --report \
--server="$server" --environment="$environ"
Replace $server and $environment with the name of your puppetmaster
and the environment you want to use. (And I actually redirect the output
to a local logfile, named according to date and time.) You should be
able to put those parameters in puppet.conf on the client instead of
passing them on the command line.
If you have any custom types or custom functions, you *can't* have
them per environment. You will note that the libdir parameter in
my master's puppet.conf is in the [puppetmasterd] section, not in
the [production] or [bellman] sections. :-( Luckily I don't update
my plugins very often, so I survive, but it's not exactly fun. (In
0.24 you can't even have custom facts per environment, but at least
that was fixed for 0.25.)
/Bellman
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---