From 8bf4142e1d6e874147a79c2bf1d68a4ecfbdab9d Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 15 Feb 2010 20:48:52 -0200 Subject: Introducing $main_master --- manifests/init.pp | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'manifests/init.pp') 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 { -- cgit v1.2.3