]> gitweb.fluxo.info Git - puppet-apt.git/commitdiff
[feat] Don't run an additional apt-get update
authorvarac <varacanero@zeromail.org>
Wed, 9 Dec 2015 15:31:35 +0000 (16:31 +0100)
committervarac <varacanero@zeromail.org>
Sun, 13 Dec 2015 16:56:17 +0000 (17:56 +0100)
When adding custom keys, an additional `apt-get update` would
be run before the Exec['refresh_apt'], which don't make sense.

manifests/init.pp

index 6732adedac505d5ac63ce3bf2c1a2163289b4fa8..1e7ddd7f70752138e24ea74a3a4c74d941eb9a96 100644 (file)
@@ -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']
       }
     }
   }