blob: f7668191ee677746bef8c30bf4b976024e1f6447 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
class apt::preferences {
$pref_contents = $custom_preferences ? {
'' => $operatingsystem ? {
'debian' => template("apt/${operatingsystem}/preferences_${codename}.erb"),
'ubuntu' => template("apt/${operatingsystem}/preferences_${codename}.erb"),
},
default => $custom_preferences
}
file { '/etc/apt/preferences':
ensure => present,
alias => 'apt_config',
# only update together
content => $pref_contents,
require => File["/etc/apt/sources.list"],
owner => root, group => 0, mode => 0644;
}
}
|