diff options
author | varac <varacanero@zeromail.org> | 2015-04-13 23:16:00 +0200 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2016-01-22 09:50:33 +0100 |
commit | 150579fb14716892cc3e4d7d9c0f81b30d56f03a (patch) | |
tree | 1cec18fffe6d70edd64696802cba264693f38ff5 /puppet | |
parent | d87a8787908fb1c82901d9611a971c9bed0a3907 (diff) |
restructured site.pp, now only one class gets included in site.pp per service (Bug #6851)
Also, moved global Exec{} defaults to site.pp
Change-Id: I9ae91b77afde944d2f1312613b9d9030e32239dd
Diffstat (limited to 'puppet')
-rw-r--r-- | puppet/manifests/site.pp | 10 | ||||
-rw-r--r-- | puppet/modules/site_config/manifests/default.pp | 6 | ||||
-rw-r--r-- | puppet/modules/site_couchdb/manifests/init.pp | 1 | ||||
-rw-r--r-- | puppet/modules/site_mx/manifests/init.pp | 1 | ||||
-rw-r--r-- | puppet/modules/site_nagios/manifests/init.pp | 3 | ||||
-rw-r--r-- | puppet/modules/site_obfsproxy/manifests/init.pp | 1 | ||||
-rw-r--r-- | puppet/modules/site_openvpn/manifests/init.pp | 4 | ||||
-rw-r--r-- | puppet/modules/site_static/manifests/init.pp | 1 | ||||
-rw-r--r-- | puppet/modules/site_tor/manifests/init.pp | 1 | ||||
-rw-r--r-- | puppet/modules/site_webapp/manifests/init.pp | 2 | ||||
-rw-r--r-- | puppet/modules/soledad/manifests/server.pp | 3 |
11 files changed, 20 insertions, 13 deletions
diff --git a/puppet/manifests/site.pp b/puppet/manifests/site.pp index 91dd2d3c..6bafff8e 100644 --- a/puppet/manifests/site.pp +++ b/puppet/manifests/site.pp @@ -2,12 +2,10 @@ # the logoutput exec parameter defaults to "on_error" in puppet 3, # but to "false" in puppet 2.7, so we need to set this globally here Exec { - logoutput => on_failure, - path => '/usr/bin:/usr/sbin/:/bin:/sbin:/usr/local/bin:/usr/local/sbin' + logoutput => on_failure, + path => '/usr/bin:/usr/sbin/:/bin:/sbin:/usr/local/bin:/usr/local/sbin' } -include site_config::setup -include site_config::default $services = hiera('services', []) $services_str = join($services, ', ') @@ -15,7 +13,6 @@ notice("Services for ${fqdn}: ${services_str}") if member($services, 'openvpn') { include site_openvpn - include site_obfsproxy } if member($services, 'couchdb') { @@ -24,7 +21,6 @@ if member($services, 'couchdb') { if member($services, 'webapp') { include site_webapp - include site_nickserver } if member($services, 'soledad') { @@ -50,5 +46,3 @@ if member($services, 'static') { if member($services, 'obfsproxy') { include site_obfsproxy } - -include site_config::packages::uninstall diff --git a/puppet/modules/site_config/manifests/default.pp b/puppet/modules/site_config/manifests/default.pp index 6b10dc19..4e297026 100644 --- a/puppet/modules/site_config/manifests/default.pp +++ b/puppet/modules/site_config/manifests/default.pp @@ -2,17 +2,15 @@ class site_config::default { tag 'leap_base' - # the logoutput exec parameter defaults to "on_error" in puppet 3, - # but to "false" in puppet 2.7, so we need to set this globally here - Exec<||> { logoutput => on_failure } - $services = hiera('services', []) $domain_hash = hiera('domain') include site_config::params + include site_config::setup # make sure apt is updated before any packages are installed include apt::update Package { require => Exec['apt_updated'] } + include site_config::packages::uninstall include site_config::slow diff --git a/puppet/modules/site_couchdb/manifests/init.pp b/puppet/modules/site_couchdb/manifests/init.pp index 61aa887e..ea02d1f4 100644 --- a/puppet/modules/site_couchdb/manifests/init.pp +++ b/puppet/modules/site_couchdb/manifests/init.pp @@ -50,6 +50,7 @@ class site_couchdb { -> Class['couchdb'] -> Class['site_couchdb::setup'] + include ::site_config::default include site_stunnel include site_couchdb::setup diff --git a/puppet/modules/site_mx/manifests/init.pp b/puppet/modules/site_mx/manifests/init.pp index 91014ed6..a9b0198b 100644 --- a/puppet/modules/site_mx/manifests/init.pp +++ b/puppet/modules/site_mx/manifests/init.pp @@ -2,6 +2,7 @@ class site_mx { tag 'leap_service' Class['site_config::default'] -> Class['site_mx'] + include site_config::default include site_config::x509::cert include site_config::x509::key include site_config::x509::ca diff --git a/puppet/modules/site_nagios/manifests/init.pp b/puppet/modules/site_nagios/manifests/init.pp index 40ae4b86..f91bfc26 100644 --- a/puppet/modules/site_nagios/manifests/init.pp +++ b/puppet/modules/site_nagios/manifests/init.pp @@ -1,6 +1,9 @@ # setup nagios on monitoring node class site_nagios { tag 'leap_service' + + include site_config::default + Class['site_config::default'] -> Class['site_nagios'] include site_nagios::server diff --git a/puppet/modules/site_obfsproxy/manifests/init.pp b/puppet/modules/site_obfsproxy/manifests/init.pp index 6275ebee..b622588b 100644 --- a/puppet/modules/site_obfsproxy/manifests/init.pp +++ b/puppet/modules/site_obfsproxy/manifests/init.pp @@ -19,6 +19,7 @@ class site_obfsproxy { $bind_address = hiera('ip_address') } + include site_config::default include site_apt::preferences::twisted include site_apt::preferences::obfsproxy diff --git a/puppet/modules/site_openvpn/manifests/init.pp b/puppet/modules/site_openvpn/manifests/init.pp index ede35a9e..4777464e 100644 --- a/puppet/modules/site_openvpn/manifests/init.pp +++ b/puppet/modules/site_openvpn/manifests/init.pp @@ -24,9 +24,11 @@ class site_openvpn { include site_config::x509::key include site_config::x509::ca_bundle - + include site_config::default Class['site_config::default'] -> Class['site_openvpn'] + include ::site_obfsproxy + $openvpn = hiera('openvpn') $openvpn_ports = $openvpn['ports'] $openvpn_config = $openvpn['configuration'] diff --git a/puppet/modules/site_static/manifests/init.pp b/puppet/modules/site_static/manifests/init.pp index e317f580..76ee6e19 100644 --- a/puppet/modules/site_static/manifests/init.pp +++ b/puppet/modules/site_static/manifests/init.pp @@ -1,6 +1,7 @@ class site_static { tag 'leap_service' + include site_config::default include site_config::x509::cert include site_config::x509::key include site_config::x509::ca_bundle diff --git a/puppet/modules/site_tor/manifests/init.pp b/puppet/modules/site_tor/manifests/init.pp index 80ccc5d3..2207a5a9 100644 --- a/puppet/modules/site_tor/manifests/init.pp +++ b/puppet/modules/site_tor/manifests/init.pp @@ -19,6 +19,7 @@ class site_tor { $openvpn_ports = [] } + include site_config::default include tor::daemon tor::daemon::relay { $nickname: port => 9001, diff --git a/puppet/modules/site_webapp/manifests/init.pp b/puppet/modules/site_webapp/manifests/init.pp index 837950a8..4f3147e7 100644 --- a/puppet/modules/site_webapp/manifests/init.pp +++ b/puppet/modules/site_webapp/manifests/init.pp @@ -21,11 +21,13 @@ class site_webapp { include site_webapp::couchdb include site_haproxy include site_webapp::cron + include site_config::default include site_config::x509::cert include site_config::x509::key include site_config::x509::ca include site_config::x509::client_ca::ca include site_config::x509::client_ca::key + include site_nickserver # remove leftovers from previous installations on webapp nodes include site_config::remove::webapp diff --git a/puppet/modules/soledad/manifests/server.pp b/puppet/modules/soledad/manifests/server.pp index 5c5a1bb7..f46c1eff 100644 --- a/puppet/modules/soledad/manifests/server.pp +++ b/puppet/modules/soledad/manifests/server.pp @@ -1,7 +1,10 @@ # setup soledad-server class soledad::server { tag 'leap_service' + + include site_config::default include soledad::common + include site_apt::preferences::twisted $soledad = hiera('soledad') $couchdb_user = $soledad['couchdb_soledad_user']['username'] |