2012-04-09 07:33:13 +02:00
|
|
|
class apt::dot_d_directories {
|
|
|
|
|
|
|
|
# watch .d directories and ensure they are present
|
|
|
|
file {
|
2013-01-02 14:12:11 +01:00
|
|
|
'/etc/apt/apt.conf.d':
|
|
|
|
ensure => directory,
|
2012-04-09 07:33:13 +02:00
|
|
|
checksum => mtime,
|
2013-01-02 14:12:11 +01:00
|
|
|
notify => Exec['refresh_apt'];
|
|
|
|
'/etc/apt/sources.list.d':
|
|
|
|
ensure => directory,
|
2012-04-09 07:33:13 +02:00
|
|
|
checksum => mtime,
|
2013-01-02 14:12:11 +01:00
|
|
|
notify => Exec['refresh_apt'];
|
2012-04-09 07:33:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
exec {
|
|
|
|
# "&& sleep 1" is workaround for older(?) clients
|
|
|
|
'refresh_apt':
|
2013-01-02 14:12:11 +01:00
|
|
|
command => '/usr/bin/apt-get update && sleep 1',
|
2012-04-09 07:33:13 +02:00
|
|
|
refreshonly => true,
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|