diff options
author | varac <varacanero@zeromail.org> | 2016-01-28 00:04:10 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2016-01-28 23:52:41 +0100 |
commit | a8343508a6ced1dcbca621ad4c6f3ac39676326b (patch) | |
tree | be4c0b141f9fb1647841c6ac65a9169d8faaf2e3 /puppet/modules/site_config | |
parent | 54bd11793c13140651d908db7f88d550712ee85a (diff) |
[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
Diffstat (limited to 'puppet/modules/site_config')
-rw-r--r-- | puppet/modules/site_config/manifests/default.pp | 14 | ||||
-rw-r--r-- | puppet/modules/site_config/manifests/slow.pp | 2 |
2 files changed, 12 insertions, 4 deletions
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': } } |