diff options
author | varac <varacanero@zeromail.org> | 2016-01-26 14:42:17 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2016-02-01 20:25:46 +0100 |
commit | f12b007edd557e91359fd9a5fba57f49e4a59a04 (patch) | |
tree | 1d7e9fbab069b5124f4ab194824a626b2243474c /manifests/dist_upgrade.pp | |
parent | fa1751c4de0154de7431ea18f57ddaeff329cf73 (diff) | |
download | puppet-apt-f12b007edd557e91359fd9a5fba57f49e4a59a04.tar.gz puppet-apt-f12b007edd557e91359fd9a5fba57f49e4a59a04.tar.bz2 |
[refactor] Unify `apt-get update` into one resource
Before, there were two Execs that did an `apt-get update`,
`Exec[refresh_apt]` and `Exec[apt_updated]`, which were triggered
by different resources.
This changes gets rid of the first one, and all resources now depend
on `Exec[apt_updated]`.
Diffstat (limited to 'manifests/dist_upgrade.pp')
-rw-r--r-- | manifests/dist_upgrade.pp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/manifests/dist_upgrade.pp b/manifests/dist_upgrade.pp index bf78dcc..19c031e 100644 --- a/manifests/dist_upgrade.pp +++ b/manifests/dist_upgrade.pp @@ -1,18 +1,9 @@ class apt::dist_upgrade { - if $apt::disable_update == false { - include apt::update - } - - $req = $apt::disable_update ? { - true => undef, - default => Exec['apt_updated'], - } - exec { 'apt_dist-upgrade': command => '/usr/bin/apt-get -q -y -o \'DPkg::Options::=--force-confold\' dist-upgrade', refreshonly => true, - require => $req + before => Exec['apt_updated'] } } |