Factorize.

This commit is contained in:
intrigeri 2010-12-14 21:39:50 +01:00
parent 4625afacae
commit 5846da98ce

View file

@ -1,12 +1,7 @@
define apt::upgrade_package ($version = "") {
case $version {
'': {
exec { "aptitude -y install $name":
onlyif => [ "grep-status -F Status installed -a -P $name -q", "apt-show-versions -u $name | grep -q upgradeable" ],
}
}
'latest': {
'', 'latest': {
exec { "aptitude -y install $name":
onlyif => [ "grep-status -F Status installed -a -P $name -q", "apt-show-versions -u $name | grep -q upgradeable" ],
}