]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
try to run apt-get update on repo change
authorStephen Gran <steve@lobefin.net>
Sun, 12 Jan 2014 20:24:35 +0000 (20:24 +0000)
committerStephen Gran <steve@lobefin.net>
Sun, 12 Jan 2014 20:24:35 +0000 (20:24 +0000)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/debian-org/manifests/init.pp

index ff5d0fe027dbc057284cf6d4b098b0edc1b63f12..bee310e9a8bed9c7dd9c72730f2e8396e0618962 100644 (file)
@@ -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 |>