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>
}
}
- # 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
file { "/etc/apt/sources.list.d/${name}":
ensure => $ensure,
- notify => Exec['refresh_apt'],
owner => root, group => 0, mode => 0600;
}