module-puppetlabs-apt/manifests/force.pp
2011-05-30 10:25:11 -07:00

16 lines
343 B
Puppet

# force.pp
# force a package from a specific release
define apt::force(
$release = 'testing',
$version = false
) {
exec { "/usr/bin/aptitude -y -t ${release} install ${name}":
unless => $version ? {
false => "/usr/bin/dpkg -l | grep ${name}",
default => "/usr/bin/dpkg -l | grep ${name} | grep ${version}"
}
}
}