summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-06-04 13:05:56 -0700
committerelijah <elijah@riseup.net>2014-06-04 13:05:56 -0700
commit79295764ebbefd346407b8042bc759552aa46234 (patch)
tree2788faedc0b2aa9357d264b1f6a9c28f07d88ee3
parent2f9f76682c02770f47922435f815177ceec15fd9 (diff)
bugfix: actually apply modules based on $services
-rw-r--r--puppet/manifests/site.pp22
-rw-r--r--puppet/modules/site_config/manifests/setup.pp2
2 files changed, 13 insertions, 11 deletions
diff --git a/puppet/manifests/site.pp b/puppet/manifests/site.pp
index 1eafec64..9afa5dfd 100644
--- a/puppet/manifests/site.pp
+++ b/puppet/manifests/site.pp
@@ -1,42 +1,44 @@
# set a default exec path
Exec { path => '/usr/bin:/usr/sbin/:/bin:/sbin:/usr/local/bin:/usr/local/sbin' }
-
include site_config::setup
include site_config::default
-# configure eip
-if $services =~ /\bopenvpn\b/ {
+$services = hiera('services', [])
+$services_str = join($services, ', ')
+notice("Services for ${fqdn}: ${services_str}")
+
+if member($services, 'openvpn') {
include site_openvpn
}
-if $services =~ /\bcouchdb\b/ {
+if member($services, 'couchdb') {
include site_couchdb
include tapicero
}
-if $services =~ /\bwebapp\b/ {
+if member($services, 'webapp') {
include site_webapp
include site_nickserver
}
-if $services =~ /\bsoledad\b/ {
+if member($services, 'soledad') {
include soledad::server
}
-if $services =~ /\bmonitor\b/ {
+if member($services, 'monitor') {
include site_nagios
}
-if $services =~ /\btor\b/ {
+if member($services, 'tor') {
include site_tor
}
-if $services =~ /\bmx\b/ {
+if member($services, 'mx') {
include site_mx
}
-if $services =~ /\bstatic\b/ {
+if member($services, 'static') {
include site_static
}
diff --git a/puppet/modules/site_config/manifests/setup.pp b/puppet/modules/site_config/manifests/setup.pp
index db22c4d9..01dea723 100644
--- a/puppet/modules/site_config/manifests/setup.pp
+++ b/puppet/modules/site_config/manifests/setup.pp
@@ -16,7 +16,7 @@ class site_config::setup {
# parse services for host
$services=join(hiera_array('services', ['']), ' ')
- notice("Services for ${fqdn}: ${services}")
+
# configure /etc/hosts
class { 'site_config::hosts':
stage => setup,