From be81edd7aa5e35c9bd79cd77946e6e7d17288bee Mon Sep 17 00:00:00 2001 From: varac Date: Tue, 29 Jan 2013 16:36:29 +0100 Subject: apt-get update + dist-upgrade in initial stage --- puppet/modules/site_apt/manifests/dist_upgrade.pp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'puppet/modules') diff --git a/puppet/modules/site_apt/manifests/dist_upgrade.pp b/puppet/modules/site_apt/manifests/dist_upgrade.pp index 87a2fc00..f129dd73 100644 --- a/puppet/modules/site_apt/manifests/dist_upgrade.pp +++ b/puppet/modules/site_apt/manifests/dist_upgrade.pp @@ -1,11 +1,15 @@ -class site_apt::dist_upgrade inherits apt::dist_upgrade { +class site_apt::dist_upgrade { if $::apt_running == 'true' { fail ('apt-get is running in background - Please wait until it finishes. Exiting.') + } else { + exec{'initial_apt_update': + command => '/usr/bin/apt-get update && /usr/bin/apt-get autoclean', + refreshonly => false, + } + exec{'initial_apt_dist_upgrade': + command => "/usr/bin/apt-get -q -y -o 'DPkg::Options::=--force-confold' dist-upgrade", + refreshonly => false, + } } - # ensue dist-upgrade on every puppetrun - Exec['apt_dist-upgrade']{ - refreshonly => false, - } - } -- cgit v1.2.3