aboutsummaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authorGabriel Filion <lelutin@gmail.com>2010-10-25 12:36:59 -0400
committerGabriel Filion <lelutin@gmail.com>2010-10-25 14:15:52 -0400
commit92aa5a51e95d74604a40318558aa98f70fcf7720 (patch)
tree00ad85b628531ce95a47c9b7be9be83fbf4eed26 /manifests/init.pp
parentaaf3bd6adb6cf979ce7c18492c3a60fa2b31cba9 (diff)
downloadpuppet-apt-92aa5a51e95d74604a40318558aa98f70fcf7720.tar.gz
puppet-apt-92aa5a51e95d74604a40318558aa98f70fcf7720.tar.bz2
Ensure presence of sources.list.d and watch it
Add a file resource on the apt/sources.list.d directory to ensure that it is created as a directory and watch it for modifications to automatically refresh the apt cache. Signed-off-by: Gabriel Filion <lelutin@gmail.com>
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp7
1 files changed, 6 insertions, 1 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 9298d1a..140d2a6 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -54,8 +54,13 @@ class apt {
}
}
- # watch apt.conf.d
+ # watch .d directories and ensure they are present
file { "/etc/apt/apt.conf.d": ensure => directory, checksum => mtime; }
+ file { "/etc/apt/sources.list.d":
+ ensure => directory,
+ checksum => mtime,
+ notify => Exec['refresh_apt'],
+ }
exec {
# "&& sleep 1" is workaround for older(?) clients