diff options
author | ng <ng+gitlab@immerda.ch> | 2015-12-16 07:39:12 +0000 |
---|---|---|
committer | ng <ng+gitlab@immerda.ch> | 2015-12-16 07:39:12 +0000 |
commit | c410b5c8dedac62f9c586ad83f4772b5d21dea3c (patch) | |
tree | 80cd3cafaa51cd9bd15ad12ff7b0d1219d058fb4 | |
parent | abe5212b01a9ed889a486795b26e845f56e334a2 (diff) | |
parent | d67dfe4beb6cc21660281a5c02a4c4b7a061fa1c (diff) | |
download | puppet-apt-c410b5c8dedac62f9c586ad83f4772b5d21dea3c.tar.gz puppet-apt-c410b5c8dedac62f9c586ad83f4772b5d21dea3c.tar.bz2 |
Merge branch 'remove_double_apt_get_update' into 'master'
[feat] Don't run an additional apt-get update
When adding custom keys, an additional `apt-get update` would
be run before the Exec['refresh_apt'], which don't make sense.
See merge request !31
-rw-r--r-- | manifests/init.pp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 6732ade..1e7ddd7 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -123,17 +123,14 @@ class apt( mode => '0755', } exec { 'custom_keys': - command => "find ${apt_base_dir}/keys.d -type f -exec apt-key add '{}' \\; && /usr/bin/apt-get update", + command => "find ${apt_base_dir}/keys.d -type f -exec apt-key add '{}' \\;", subscribe => File["${apt_base_dir}/keys.d"], refreshonly => true, + notify => Exec[refresh_apt] } if $custom_preferences != false { Exec['custom_keys'] { - before => [ Exec[refresh_apt], File['apt_config'] ] - } - } else { - Exec['custom_keys'] { - before => Exec[refresh_apt] + before => File['apt_config'] } } } |