From: Stephen Gran Date: Sun, 12 Jan 2014 20:24:35 +0000 (+0000) Subject: try to run apt-get update on repo change X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=0e10f3aae0e81db9112da26efbc6fe958d9a1878;p=mirror%2Fdsa-puppet.git try to run apt-get update on repo change Signed-off-by: Stephen Gran --- diff --git a/modules/debian-org/manifests/init.pp b/modules/debian-org/manifests/init.pp index ff5d0fe02..bee310e9a 100644 --- a/modules/debian-org/manifests/init.pp +++ b/modules/debian-org/manifests/init.pp @@ -243,9 +243,17 @@ class debian-org { require => Package['debian.org'] } + file { '/usr/local/bin/check_for_updates': + source => 'puppet:///modules/debian-org/check_for_updates', + mode => '0755', + owner => root, + group => root, + } + exec { 'apt-get update': - path => '/usr/bin:/usr/sbin:/bin:/sbin', - refreshonly => true, + path => '/usr/bin:/usr/sbin:/bin:/sbin', + onlyif => '/opt/bin/check_for_updates', + require => File['/opt/bin/check_for_updates'] } Exec['apt-get update']->Package<| tag == extra_repo |>