module-puppetlabs-apt/manifests/pin.pp
Dan Bode d8a1e4ee9d Created a params class to hold global data.
- Removes coupling between global data and
  resources from apt class.
- Makes it easier to organize things into stages.
2011-05-30 10:24:58 -07:00

19 lines
398 B
Puppet

# 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}",
}
include apt::params
name => "${apt::params::root}/preferences.d/${name}",
}