module-puppetlabs-apt/manifests/pin.pp
Nan Liu effb3f7ff3 (#14308) Add ensure=>absent for define resource.
Several apt::* define resource type does not support ensurable. This
update allows ensure=>absent to support the removal of these
configuration files.

* apt::conf
* apt::pin
* apt::source
2012-05-03 16:59:13 -07:00

22 lines
482 B
Puppet

# pin.pp
# pin a release in apt, useful for unstable repositories
define apt::pin(
$ensure = present,
$packages = '*',
$priority = 0
) {
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=${name}\nPin-Priority: ${priority}",
}
}