From f12b007edd557e91359fd9a5fba57f49e4a59a04 Mon Sep 17 00:00:00 2001 From: varac Date: Tue, 26 Jan 2016 14:42:17 +0100 Subject: [refactor] Unify `apt-get update` into one resource Before, there were two Execs that did an `apt-get update`, `Exec[refresh_apt]` and `Exec[apt_updated]`, which were triggered by different resources. This changes gets rid of the first one, and all resources now depend on `Exec[apt_updated]`. --- manifests/dot_d_directories.pp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'manifests/dot_d_directories.pp') diff --git a/manifests/dot_d_directories.pp b/manifests/dot_d_directories.pp index 37c3fc8..0ace863 100644 --- a/manifests/dot_d_directories.pp +++ b/manifests/dot_d_directories.pp @@ -5,18 +5,11 @@ class apt::dot_d_directories { '/etc/apt/apt.conf.d': ensure => directory, checksum => mtime, - notify => Exec['refresh_apt']; + notify => Exec['apt_updated']; '/etc/apt/sources.list.d': ensure => directory, checksum => mtime, - notify => Exec['refresh_apt']; - } - - exec { - # "&& sleep 1" is workaround for older(?) clients - 'refresh_apt': - command => '/usr/bin/apt-get update && sleep 1', - refreshonly => true, + notify => Exec['apt_updated']; } } -- cgit v1.2.3