diff options
| -rw-r--r-- | puppet/manifests/site.pp | 9 | ||||
| -rw-r--r-- | puppet/modules/site_config/manifests/default.pp | 14 | ||||
| -rw-r--r-- | puppet/modules/site_config/manifests/slow.pp | 2 | 
3 files changed, 21 insertions, 4 deletions
diff --git a/puppet/manifests/site.pp b/puppet/manifests/site.pp index 6bafff8e..f012d6c8 100644 --- a/puppet/manifests/site.pp +++ b/puppet/manifests/site.pp @@ -11,6 +11,15 @@ $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  } diff --git a/puppet/modules/site_config/manifests/default.pp b/puppet/modules/site_config/manifests/default.pp index 7a2a0a79..96f06e6c 100644 --- a/puppet/modules/site_config/manifests/default.pp +++ b/puppet/modules/site_config/manifests/default.pp @@ -7,11 +7,17 @@ class site_config::default {    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'] } +  # By default, the class 'site_config::slow' is included in site.pp. +  # It basically does an 'apt-get update' and 'apt-get dist-upgrade'. +  # This class can be excluded by using 'leap deploy --fast', +  # see https://leap.se/en/docs/platform/details/under-the-hood#tags for more +  # details. +  # The following Package resource override makes sure that *if* an +  # 'apt-get update' is executed by 'site_config::slow', it should be done +  # before any packages are installed. + +  Package { require => Exec['refresh_apt'] } -  include site_config::slow    # default class, used by all hosts diff --git a/puppet/modules/site_config/manifests/slow.pp b/puppet/modules/site_config/manifests/slow.pp index 3650eb19..de276bc3 100644 --- a/puppet/modules/site_config/manifests/slow.pp +++ b/puppet/modules/site_config/manifests/slow.pp @@ -3,5 +3,7 @@  # the "--fast" parameter  class site_config::slow {    tag 'leap_slow' + +  include apt::update    class { 'site_apt::dist_upgrade': }  }  | 
