aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2016-01-05 11:39:57 +0100
committervarac <varacanero@zeromail.org>2016-01-05 20:04:10 +0100
commitfa1751c4de0154de7431ea18f57ddaeff329cf73 (patch)
treea07fd347525e4c39b1ba2ed71bd884df33c4facc
parent185ac30062d7aa11fc39a24aa89504e5ac0db6d9 (diff)
downloadpuppet-apt-fa1751c4de0154de7431ea18f57ddaeff329cf73.tar.gz
puppet-apt-fa1751c4de0154de7431ea18f57ddaeff329cf73.tar.bz2
[bug] Deploy preferene snippets before apt_refresh
When pinning packages with apt::preferences_snippet, we need to make sure these get deployed before an `apt-get update` is triggered, so pinned packages can get installed in the right way with a single puppetrun.
-rw-r--r--manifests/preferences_snippet.pp3
1 files changed, 2 insertions, 1 deletions
diff --git a/manifests/preferences_snippet.pp b/manifests/preferences_snippet.pp
index 0c7b7bb..99feac4 100644
--- a/manifests/preferences_snippet.pp
+++ b/manifests/preferences_snippet.pp
@@ -31,7 +31,8 @@ define apt::preferences_snippet (
file { "/etc/apt/preferences.d/${name}":
ensure => $ensure,
- owner => root, group => 0, mode => '0644';
+ owner => root, group => 0, mode => '0644',
+ before => Exec['refresh_apt'];
}
case $source {