From a8343508a6ced1dcbca621ad4c6f3ac39676326b Mon Sep 17 00:00:00 2001 From: varac Date: Thu, 28 Jan 2016 00:04:10 +0100 Subject: [feat] Fix fast deploy using 'leap deploy --fast' This worked before, but somehow stopped working. We need to include 'site_config::slow' top-level scope instead of including it in 'site_config::default', because otherwise it would get tagged with 'leap_base', and would be included always. This way 'site_config::slow' gets included by default, but can be excluded by using 'leap deploy --fast'. See https://leap.se/en/docs/platform/details/under-the-hood#tags - Resolves: #7844 --- puppet/modules/site_config/manifests/default.pp | 14 ++++++++++---- puppet/modules/site_config/manifests/slow.pp | 2 ++ 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'puppet/modules/site_config') 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': } } -- cgit v1.2.3