95d445c21c8be61ebae2021eaaabc963544461e1
[puppet-modules/puppetlabs-apt.git] / manifests / pin.pp
1 # pin.pp
2 # pin a release in apt, useful for unstable repositories
3
4 define apt::pin(
5   $packages = '*',
6   $priority = 0
7 ) {
8
9   include apt::params
10
11   $pcontent = "# ${name}\nPackage: ${packages}\nPin: release a=${name}\nPin-Priority: ${priority}"
12   file { "${name}.pref":
13     ensure  => file,
14     path    => "${apt::params::root}/preferences.d/${name}",
15     owner   => root,
16     group   => root,
17     mode    => '0644',
18     content => "# ${name}\nPackage: ${packages}\nPin: release a=${name}\nPin-Priority: ${priority}",
19   }
20 }