]> gitweb.fluxo.info Git - puppet-apt.git/commitdiff
Ensure presence of sources.list.d and watch it
authorGabriel Filion <lelutin@gmail.com>
Mon, 25 Oct 2010 16:36:59 +0000 (12:36 -0400)
committerGabriel Filion <lelutin@gmail.com>
Mon, 25 Oct 2010 18:15:52 +0000 (14:15 -0400)
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>
manifests/init.pp
manifests/sources_list.pp

index 9298d1adc525490371181258dba8c464ce5df224..140d2a60ff0bb948d00945d6ce1fcdcf243cd64e 100644 (file)
@@ -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
index d3f18d5ddc5263654c5182721f371f5f6f991cf9..bbf887a399976db4397c1418509afeb0fe4513b8 100644 (file)
@@ -12,7 +12,6 @@ define apt::sources_list (
 
   file { "/etc/apt/sources.list.d/${name}":
     ensure => $ensure,
-    notify => Exec['refresh_apt'],
     owner => root, group => 0, mode => 0600;
   }