diff options
Diffstat (limited to 'puppet')
-rw-r--r-- | puppet/manifests/site.pp | 120 | ||||
-rw-r--r-- | puppet/modules/site_config/lib/puppet/parser/functions/create_resources_hash_from.rb (renamed from puppet/lib/puppet/parser/functions/create_resources_hash_from.rb) | 0 | ||||
-rw-r--r-- | puppet/modules/site_config/lib/puppet/parser/functions/sorted_json.rb (renamed from puppet/lib/puppet/parser/functions/sorted_json.rb) | 0 | ||||
-rw-r--r-- | puppet/modules/site_config/lib/puppet/parser/functions/sorted_yaml.rb (renamed from puppet/lib/puppet/parser/functions/sorted_yaml.rb) | 0 |
4 files changed, 61 insertions, 59 deletions
diff --git a/puppet/manifests/site.pp b/puppet/manifests/site.pp index ecda4012..4b0ad459 100644 --- a/puppet/manifests/site.pp +++ b/puppet/manifests/site.pp @@ -1,60 +1,62 @@ -# set a default exec path -# 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' -} - -Package <| provider == 'apt' |> { - install_options => ['--no-install-recommends'], -} - -$services = hiera('services', []) -$services_str = join($services, ', ') -notice("Services for ${fqdn}: ${services_str}") - -# In the default deployment case, we want to run an 'apt-get dist-upgrade' -# to ensure the latest packages are installed. This is done by including the -# class 'site_config::slow' here. However, you only changed a small bit of -# the platform and want to skip this slow part of deployment, you can do that -# by using 'leap deploy --fast' which will only apply those resources that are -# tagged with 'leap_base' or 'leap_service'. -# See https://leap.se/en/docs/platform/details/under-the-hood#tags -include site_config::slow - -if member($services, 'openvpn') { - include site_openvpn -} - -if member($services, 'couchdb') { - include site_couchdb -} - -if member($services, 'webapp') { - include site_webapp -} - -if member($services, 'soledad') { - include soledad::server -} - -if member($services, 'monitor') { - include site_nagios -} - -if member($services, 'tor') { - include site_tor -} - -if member($services, 'mx') { - include site_mx -} - -if member($services, 'static') { - include site_static -} - -if member($services, 'obfsproxy') { - include site_obfsproxy +node default { + # set a default exec path + # 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' + } + + Package <| provider == 'apt' |> { + install_options => ['--no-install-recommends'], + } + + $services = hiera('services', []) + $services_str = join($services, ', ') + notice("Services for ${fqdn}: ${services_str}") + + # In the default deployment case, we want to run an 'apt-get dist-upgrade' + # to ensure the latest packages are installed. This is done by including the + # class 'site_config::slow' here. However, you only changed a small bit of + # the platform and want to skip this slow part of deployment, you can do that + # by using 'leap deploy --fast' which will only apply those resources that are + # tagged with 'leap_base' or 'leap_service'. + # See https://leap.se/en/docs/platform/details/under-the-hood#tags + include site_config::slow + + if member($services, 'openvpn') { + include site_openvpn + } + + if member($services, 'couchdb') { + include site_couchdb + } + + if member($services, 'webapp') { + include site_webapp + } + + if member($services, 'soledad') { + include soledad::server + } + + if member($services, 'monitor') { + include site_nagios + } + + if member($services, 'tor') { + include site_tor + } + + if member($services, 'mx') { + include site_mx + } + + if member($services, 'static') { + include site_static + } + + if member($services, 'obfsproxy') { + include site_obfsproxy + } } diff --git a/puppet/lib/puppet/parser/functions/create_resources_hash_from.rb b/puppet/modules/site_config/lib/puppet/parser/functions/create_resources_hash_from.rb index 47d0df9c..47d0df9c 100644 --- a/puppet/lib/puppet/parser/functions/create_resources_hash_from.rb +++ b/puppet/modules/site_config/lib/puppet/parser/functions/create_resources_hash_from.rb diff --git a/puppet/lib/puppet/parser/functions/sorted_json.rb b/puppet/modules/site_config/lib/puppet/parser/functions/sorted_json.rb index 605da00e..605da00e 100644 --- a/puppet/lib/puppet/parser/functions/sorted_json.rb +++ b/puppet/modules/site_config/lib/puppet/parser/functions/sorted_json.rb diff --git a/puppet/lib/puppet/parser/functions/sorted_yaml.rb b/puppet/modules/site_config/lib/puppet/parser/functions/sorted_yaml.rb index 46cd46ce..46cd46ce 100644 --- a/puppet/lib/puppet/parser/functions/sorted_yaml.rb +++ b/puppet/modules/site_config/lib/puppet/parser/functions/sorted_yaml.rb |