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
|
|
|
|
) {
|
|
|
|
|
|
|
|
file { "${name}.pref":
|
|
|
|
ensure => file,
|
|
|
|
owner => root,
|
|
|
|
group => root,
|
|
|
|
mode => 644,
|
|
|
|
content => "# ${name}\nPackage: ${packages}\nPin: release a=${name}\nPin-Priority: ${priority}",
|
|
|
|
}
|
2011-05-30 19:18:13 +02:00
|
|
|
include apt::params
|
2010-04-27 22:38:28 +02:00
|
|
|
|
2011-05-30 19:18:13 +02:00
|
|
|
name => "${apt::params::root}/preferences.d/${name}",
|
2010-04-27 22:38:28 +02:00
|
|
|
}
|