module-puppetlabs-apt/manifests/pin.pp

21 lines
380 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(
$packages = '*',
$priority = 0
) {
include apt
2011-03-11 18:02:50 +01:00
2010-04-27 22:38:28 +02:00
file { "${name}.pref":
name => "${apt::root}/preferences.d/${name}",
ensure => file,
owner => root,
group => root,
mode => 644,
content => "# ${name}\nPackage: ${packages}\nPin: release a=${name}\nPin-Priority: ${priority}",
}
}