blob: 80562868d6684c034d0d7cec2c26d55797c55fff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
define apt::upgrade_package ($version = "") {
include apt::update
$version_suffix = $version ? {
'' => '',
'latest' => '',
default => "=${version}",
}
package { ['apt-show-versions', 'dctrl-tools']:
ensure => installed,
require => undef,
}
exec { "aptitude -y 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'],
],
}
}
|