diff options
-rw-r--r-- | manifests/upgrade_package.pp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/manifests/upgrade_package.pp b/manifests/upgrade_package.pp index ecdd74f..7656a9b 100644 --- a/manifests/upgrade_package.pp +++ b/manifests/upgrade_package.pp @@ -2,12 +2,12 @@ define apt::upgrade_package ($version = "") { case $version { '', 'latest': { - exec { "aptitude -y install $name": + exec { "/usr/bin/apt-get update && aptitude -y install $name": onlyif => [ "grep-status -F Status installed -a -P $name -q", "apt-show-versions -u $name | grep -q upgradeable" ], } } default: { - exec { "aptitude -y install $name=$version": + exec { "/usr/bin/apt-get update && aptitude -y install $name=$version": onlyif => [ "grep-status -F Status installed -a -P $name -q", "apt-show-versions -u $name | grep -q upgradeable" ], } } |