diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index c6578cd..5251251 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -405,13 +405,25 @@ class nodo::master { include database include gitosis include websites::admin - # TODO: - #include munin::host - host { "puppet": - ensure => present, - ip => "127.0.0.1", - alias => ["puppet.$domain"], + case $main_master { + '': { fail("You need to define if this is the main master! Please set \$main_master in host config") } + } + + if $main_master = true { + include munin::host + + # The main master has a host entry pointing to itself, other + # masters still retrieve catalogs from the main master. + host { "puppet": + ensure => present, + ip => "127.0.0.1", + alias => ["puppet.$domain"], + } + } else { + host { "puppet": + ensure => absent, + } } case $puppetmaster_db_password { |