diff options
Diffstat (limited to 'puppet')
-rw-r--r-- | puppet/manifests/site.pp | 22 | ||||
-rw-r--r-- | puppet/modules/site_config/manifests/setup.pp | 2 |
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, |