dot_d_directories.pp 518 B

12345678910111213141516171819202122
  1. class apt::dot_d_directories {
  2. # watch .d directories and ensure they are present
  3. file {
  4. '/etc/apt/apt.conf.d':
  5. ensure => directory,
  6. checksum => mtime,
  7. notify => Exec['refresh_apt'];
  8. '/etc/apt/sources.list.d':
  9. ensure => directory,
  10. checksum => mtime,
  11. notify => Exec['refresh_apt'];
  12. }
  13. exec {
  14. # "&& sleep 1" is workaround for older(?) clients
  15. 'refresh_apt':
  16. command => '/usr/bin/apt-get update && sleep 1',
  17. refreshonly => true,
  18. }
  19. }