From a835369958226bac2d010fedb50ed5ef98b5906f Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Mon, 9 Apr 2012 01:39:29 -0400 Subject: Force an apt-get update when changing an apt::sources_list sources_list doesn't currently force puppet to run 'apt-get update' after creating/modifying/removing files in sources.list.d. Signed-off-by: Gabriel Filion --- manifests/sources_list.pp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'manifests/sources_list.pp') diff --git a/manifests/sources_list.pp b/manifests/sources_list.pp index edf7f22..499116d 100644 --- a/manifests/sources_list.pp +++ b/manifests/sources_list.pp @@ -13,9 +13,13 @@ define apt::sources_list ( include apt::dot_d_directories + # One would expect the 'file' resource on sources.list.d to trigger an + # apt-get update when files are added or modified in the directory, but it + # apparently doesn't. file { "/etc/apt/sources.list.d/${name}": ensure => $ensure, - owner => root, group => 0, mode => 0644; + owner => root, group => 0, mode => 0644, + notify => Exec['refresh_apt'], } if $source { -- cgit v1.2.3