summaryrefslogtreecommitdiff
path: root/manifests/upgrade_package.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/upgrade_package.pp')
-rw-r--r--manifests/upgrade_package.pp13
1 files changed, 8 insertions, 5 deletions
diff --git a/manifests/upgrade_package.pp b/manifests/upgrade_package.pp
index 9202624..2ce6932 100644
--- a/manifests/upgrade_package.pp
+++ b/manifests/upgrade_package.pp
@@ -1,6 +1,8 @@
define apt::upgrade_package ($version = "") {
- include apt::update
+ if $apt::disable_update == false {
+ include apt::update
+ }
$version_suffix = $version ? {
'' => '',
@@ -24,10 +26,11 @@ define apt::upgrade_package ($version = "") {
exec { "apt-get -q -y -o 'DPkg::Options::=--force-confold' install ${name}${version_suffix}":
onlyif => [ "grep-status -F Status installed -a -P $name -q", "apt-show-versions -u $name | grep -q upgradeable" ],
- require => [
- Exec['apt_updated'],
- Package['apt-show-versions', 'dctrl-tools'],
- ],
+ require => $apt::disable_update ? {
+ true => Package['apt-show-versions', 'dctrl-tools'],
+ default => [ Exec['apt_updated'],
+ Package['apt-show-versions', 'dctrl-tools'] ],
+ }
}
}