summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authorGabriel Filion <lelutin@gmail.com>2011-08-23 16:53:14 -0400
committerGabriel Filion <lelutin@gmail.com>2011-08-23 16:53:14 -0400
commit000165503f79e6214047ba2622bdabf4176a68a0 (patch)
tree01db62dc19ff98089b0e555627df2b4c17fdabcd /manifests/init.pp
parent56528806115735c1717408989d6d39049574333b (diff)
Move $puppet_default_config_dir to the puppet class
We'd like to use this variable in the 'puppet' class since we're defining the path to another config file, there. Since puppet::puppetmaster inherits the puppet class, the variable will be defined appropriately. Just to make sure we get the value from the right place, let's also use the qualified variable name. To avoid useless repetitions in the variable name, change the variable name from $puppet_default_config_dir to $default_config_dir. Signed-off-by: Gabriel Filion <lelutin@gmail.com>
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp10
1 files changed, 6 insertions, 4 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index fb10773..c05631a 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -19,15 +19,17 @@
#
class puppet {
- $puppet_default_config = $kernel ? {
- freebsd => '/usr/local/etc/puppet/puppet.conf',
- default => '/etc/puppet/puppet.conf',
+ $default_config_dir = $operatingsystem ? {
+ freebsd => "/usr/local/etc/puppet",
+ default => "/etc/puppet",
}
+ $puppet_default_config = "$default_config_dir/puppet.conf"
+
if $puppet_config == '' { $puppet_config = $puppet_default_config }
case $kernel {
- linux: {
+ linux: {
case $operatingsystem {
gentoo: { include puppet::gentoo }
centos: { include puppet::centos }