From 5fdcfd3b80a038a18aba9a975270acc686efd185 Mon Sep 17 00:00:00 2001 From: varac Date: Sun, 20 Jan 2013 17:47:03 +0100 Subject: don't run if another apt-get process is running --- puppet/modules/site_apt/manifests/dist_upgrade.pp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'puppet/modules/site_apt/manifests') diff --git a/puppet/modules/site_apt/manifests/dist_upgrade.pp b/puppet/modules/site_apt/manifests/dist_upgrade.pp index adf165bd..87a2fc00 100644 --- a/puppet/modules/site_apt/manifests/dist_upgrade.pp +++ b/puppet/modules/site_apt/manifests/dist_upgrade.pp @@ -1,11 +1,11 @@ class site_apt::dist_upgrade inherits apt::dist_upgrade { - # really upgrade on every puppetrun + if $::apt_running == 'true' { + fail ('apt-get is running in background - Please wait until it finishes. Exiting.') + } + # ensue dist-upgrade on every puppetrun Exec['apt_dist-upgrade']{ refreshonly => false, } - # Ensure apt-get upgrade has been run before installing any packages - # Disables because apt-get update is moved to stage initial - # Exec["apt_dist-upgrade"] -> Package <| name != 'lsb-release' |> } -- cgit v1.2.3