define apt::pin(
$ensure = present,
- $explanation = "${::caller_module_name}: ${name}",
+ $explanation = "${caller_module_name}: ${name}",
$order = '',
$packages = '*',
$priority = 0,
}
- $path = $order ? {
- '' => "${preferences_d}/${name}.pref",
- default => "${preferences_d}/${order}-${name}.pref",
- }
# According to man 5 apt_preferences:
# The files have either no or "pref" as filename extension
# be silently ignored.
$file_name = regsubst($title, '[^0-9a-z\-_\.]', '_', 'IG')
+ $path = $order ? {
+ '' => "${preferences_d}/${file_name}.pref",
+ default => "${preferences_d}/${order}-${file_name}.pref",
+ }
file { "${file_name}.pref":
ensure => $ensure,
path => $path,