aboutsummaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-02-15 20:48:52 -0200
committerSilvio Rhatto <rhatto@riseup.net>2010-02-15 20:48:52 -0200
commit8bf4142e1d6e874147a79c2bf1d68a4ecfbdab9d (patch)
tree218c14af2bdcf923658ce193083dfea5912c5c53 /manifests/init.pp
parent290469a28c7504341a89afc60e4d0078e50e78b0 (diff)
downloadpuppet-nodo-8bf4142e1d6e874147a79c2bf1d68a4ecfbdab9d.tar.gz
puppet-nodo-8bf4142e1d6e874147a79c2bf1d68a4ecfbdab9d.tar.bz2
Introducing $main_master
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp24
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 {