]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Updating to new puppet module scheme
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 24 Jan 2013 21:58:26 +0000 (19:58 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 24 Jan 2013 21:58:26 +0000 (19:58 -0200)
manifests/master.pp
manifests/nodo.pp

index e355e8edf2b8563bfe558c4dd1e2928e7fa8c942..4c384b6cfe5cfc1107f90e38e7b40e6ee9e8d06d 100644 (file)
@@ -1,11 +1,11 @@
 class nodo::master {
-  case $main_master {
-    '': { fail("You need to define if this is the main master! Please set \$main_master in host config") }
-  }
+  $main_master = hiera('nodo::master::main', false)
 
   if $main_master == true {
     # Puppetmaster should be included before nodo::vserver
-    include puppetmasterd
+    class { 'puppetmasterd':
+      main => true,
+    }
 
     # This is a workaround to correctly set allowed hosts on munin
     # client when the host is also present.
@@ -16,7 +16,7 @@ class nodo::master {
     # Right now we don't need to bother with fixing $munin_port as
     # we are running the munin host in the main master node but it's
     # mandatory to fix $munin_allow so munin can connect into the node.
-    $munin_allow = $global_munin_allow
+    $munin_allow = hiera('nodo::munin_node::host',   '')
 
     include munin::host
     include munin::plugins::muninhost
@@ -29,7 +29,9 @@ class nodo::master {
       alias  => ["puppet.$domain"],
     }
   } else {
-    include puppetmasterd::disabled
+    class { 'puppetmasterd':
+      main => false,
+    }
 
     host { "puppet":
       ensure => absent,
index f0a6b219062e8e5d8a4c63deed215e3bd96c2113..d05e3d6534b82fc55a0f5752d076e881fa554b3b 100644 (file)
@@ -1,6 +1,5 @@
 class nodo {
   include lsb
-  include puppetd
   include sudo
   include users::admin
   include motd
@@ -13,6 +12,7 @@ class nodo {
   include domain
   include concat::setup
 
+  class { 'puppetd': }
   class { 'backup': }
 
   # Does not work well inside vservers