]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Refactoring hosting type
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 24 Jan 2013 22:08:41 +0000 (20:08 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 24 Jan 2013 22:08:41 +0000 (20:08 -0200)
manifests/master.pp
manifests/subsystems/websites.pp
manifests/vserver.pp

index 4c384b6cfe5cfc1107f90e38e7b40e6ee9e8d06d..28fbdf133f94ce3446a0cac0e816bc33ebe2993f 100644 (file)
@@ -38,9 +38,6 @@ class nodo::master {
     }
   }
 
-  # We should run master nodes web server behind an HTTPS proxy
-  $nodo_https_proxy = 'yes'
-
   # These should be included after puppetmaster
   include nodo::vserver
   include database
index 30249a606537cd8b007440355ce68b444494b641..6405a1e778fdd328fc6b6009dc129e9ac7f652ce 100644 (file)
@@ -1,7 +1,13 @@
 class websites::setup {
+  # Third-party hosted nodes generally aren't behind an https proxy
+  $hosting_type = hiera('nodo::vserver::hosting_type', 'direct')
+
   # Include apache
   class { 'apache':
-    https_proxy => $nodo_https_proxy,
+    https_proxy => ? $hosting_type {
+      'direct' => 'yes',
+      default  => false,
+    },
   }
 
   # The needed apache modules
index b68d5019b56ec520245096c765dd64667d3b63c6..a889e9ae762150364113ee404a2d6d1b972e92c7 100644 (file)
@@ -11,10 +11,7 @@ class nodo::vserver inherits nodo {
     dohwinfo   => false,
   }
 
-  $hosting_type = $node_hosting_type ? {
-    ''      => "direct",
-    default => "$node_hosting_type",
-  }
+  $hosting_type = hiera('nodo::vserver::hosting_type', 'direct')
 
   case $hosting_type {
     "direct": {
@@ -22,16 +19,13 @@ class nodo::vserver inherits nodo {
       # for directly hosted nodes.
       Munin_node        <<| title == $::hostname |>>
       Monkeysphere_host <<| title == $::hostname |>>
-
-      # Set proxy configuration
-      $nodo_https_proxy = 'yes'
     }
     "third-party": {
       # Apply munin and monkeysphere configuration for
       # nodes hosted by third-parties.
       munin_node { "${::hostname}": }
       monkeysphere_host { "${::hostname}":
-        port => $node_ssh_port,
+        port => hiera('nodo::vserver::ssh_port', '22'),
       }
 
       # Nagios configuration