module-puppetlabs-apt/manifests/pin.pp
Nan Liu e8977deea1 (#14321) apt::pin resource support release.
apt::pin release should default to title, but should be able to
override. This update removes unnecessary "" around $name, and add spec
tests.

Conflicts:

	spec/defines/pin_spec.rb
2012-05-04 13:56:35 -07:00

23 lines
506 B
Puppet

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