]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Monkeysphere host really needs to be a resource and not a class
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 24 Jan 2013 17:40:46 +0000 (15:40 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 24 Jan 2013 17:40:46 +0000 (15:40 -0200)
manifests/host.pp
manifests/plug.pp
manifests/subsystems/monkeysphere.pp
manifests/vserver.pp
manifests/vserver/instance.pp

index ee6c18e52fc30111102392313ea76d1a8ed51903..42e739d3216edb82efb90daa5dce9349db6876a0 100644 (file)
@@ -6,10 +6,10 @@ class nodo::host inherits nodo {
   include sysctl
   include utils::physical
   include resolver
-
-  class { 'monkeysphere_host': }
   class { 'syslog-ng': }
 
+  monkeysphere_host { "${::hostname}": }
+
   # Firewall configuration
   class { 'firewall': }
 
index 630be3af433ee73081b7d7cb5c54ced95089cf1f..f5992fce7bff7e2ee8d4d50bc911d26c665ebd27 100644 (file)
@@ -5,7 +5,7 @@ class nodo::plug inherits nodo {
   include sysctl
   include resolver
 
-  class { 'monkeysphere_host': }
+  monkeysphere_host { "${::hostname}": }
 
   class { 'firewall': }
 
index 54bf0783c479823ce1533f2d073d2c6d19480423..76530ca290d9a646b4490bc89a5c8642bf1bd471 100644 (file)
@@ -1,4 +1,4 @@
-class monkeysphere_host(
+define monkeysphere_host(
   $port           = hiera('nodo::monkeysphere_host::ssh_port', ''),
   $mail_recipient = hiera('nodo::root_mail_recipient', 'nobody')
 ) {
index 9feb030482fe6e8b4bde95e8a1a87134ee340549..b68d5019b56ec520245096c765dd64667d3b63c6 100644 (file)
@@ -20,8 +20,8 @@ class nodo::vserver inherits nodo {
     "direct": {
       # Apply munin and monkeysphere configuration for
       # for directly hosted nodes.
-      Munin_node        <<| title == $hostname |>>
-      Monkeysphere_host <<| title == $hostname |>>
+      Munin_node        <<| title == $::hostname |>>
+      Monkeysphere_host <<| title == $::hostname |>>
 
       # Set proxy configuration
       $nodo_https_proxy = 'yes'
@@ -29,8 +29,8 @@ class nodo::vserver inherits nodo {
     "third-party": {
       # Apply munin and monkeysphere configuration for
       # nodes hosted by third-parties.
-      munin_node { "$hostname": }
-      monkeysphere_host { "$hostname":
+      munin_node { "${::hostname}": }
+      monkeysphere_host { "${::hostname}":
         port => $node_ssh_port,
       }
 
index 90b0b0ad9ca5086be046b45e7ccf1d4a8318bcbb..dba9abbd077145a97a6023e59f117d8fd0549db7 100644 (file)
@@ -52,7 +52,7 @@ define nodo::vserver::instance($context, $ensure = 'running', $proxy = false,
   }
 
   # Create a munin virtual resource to be realized in the node
-  @@munin_node { "$name":
+  @@munin_node { "${name}":
     port => $munin_port ? {
       false   => "49$id",
       default => $munin_port,