From fa1751c4de0154de7431ea18f57ddaeff329cf73 Mon Sep 17 00:00:00 2001 From: varac Date: Tue, 5 Jan 2016 11:39:57 +0100 Subject: [PATCH] [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. --- manifests/preferences_snippet.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 {