module-puppetlabs-apt/manifests/pin.pp

24 lines
506 B
ObjectPascal
Raw Normal View History

2010-04-27 22:38:28 +02:00
# pin.pp
# pin a release in apt, useful for unstable repositories
define apt::pin(
$ensure = present,
$packages = '*',
2012-04-28 02:23:48 +02:00
$priority = 0,
$release = $name
2010-04-27 22:38:28 +02:00
) {
include apt::params
2010-04-27 22:38:28 +02:00
$preferences_d = $apt::params::preferences_d
file { "${name}.pref":
ensure => $ensure,
path => "${preferences_d}/${name}",
owner => root,
group => root,
mode => '0644',
2012-04-28 02:23:48 +02:00
content => "# ${name}\nPackage: ${packages}\nPin: release a=${release}\nPin-Priority: ${priority}",
}
2010-04-27 22:38:28 +02:00
}