module-puppetlabs-apt/manifests/force.pp

17 lines
329 B
ObjectPascal
Raw Normal View History

2010-04-27 22:38:28 +02:00
# force.pp
# force a package from a specific release
define apt::force(
$release = 'testing',
$version = false
) {
2011-03-11 18:02:50 +01:00
exec { "/usr/bin/aptitude -y -t ${release} install ${name}":
2010-04-27 22:38:28 +02:00
unless => $version ? {
2011-03-11 18:02:50 +01:00
false => "/usr/bin/dpkg -l | grep ${name}",
default => "/usr/bin/dpkg -l | grep ${name} | grep ${version}"
2010-04-27 22:38:28 +02:00
}
}
2011-03-11 18:02:50 +01:00
2010-04-27 22:38:28 +02:00
}