aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-24 20:08:41 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-24 20:08:41 -0200
commit796bd7bd500b94316ca189a5aba773cd27b467dc (patch)
treead49820d31ca8f4d696c2de9a335f3098e67c2b2
parent5b014151a2ad63c1265fb95180505ab14f6090d9 (diff)
downloadpuppet-nodo-796bd7bd500b94316ca189a5aba773cd27b467dc.tar.gz
puppet-nodo-796bd7bd500b94316ca189a5aba773cd27b467dc.tar.bz2
Refactoring hosting type
-rw-r--r--manifests/master.pp3
-rw-r--r--manifests/subsystems/websites.pp8
-rw-r--r--manifests/vserver.pp10
3 files changed, 9 insertions, 12 deletions
diff --git a/manifests/master.pp b/manifests/master.pp
index 4c384b6..28fbdf1 100644
--- a/manifests/master.pp
+++ b/manifests/master.pp
@@ -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
diff --git a/manifests/subsystems/websites.pp b/manifests/subsystems/websites.pp
index 30249a6..6405a1e 100644
--- a/manifests/subsystems/websites.pp
+++ b/manifests/subsystems/websites.pp
@@ -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
diff --git a/manifests/vserver.pp b/manifests/vserver.pp
index b68d501..a889e9a 100644
--- a/manifests/vserver.pp
+++ b/manifests/vserver.pp
@@ -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