2010-10-17 13:58:59 +02:00
|
|
|
class apt::preferences {
|
|
|
|
|
2013-01-02 14:12:11 +01:00
|
|
|
$pref_contents = $apt::custom_preferences ? {
|
|
|
|
'' => $::operatingsystem ? {
|
2013-01-02 16:14:06 +01:00
|
|
|
'debian' => template("apt/${::operatingsystem}/preferences_${apt::codename}.erb"),
|
|
|
|
'ubuntu' => template("apt/${::operatingsystem}/preferences_${apt::codename}.erb"),
|
2010-10-21 01:59:41 +02:00
|
|
|
},
|
2013-01-02 14:12:11 +01:00
|
|
|
default => $apt::custom_preferences
|
2010-10-17 14:36:28 +02:00
|
|
|
}
|
|
|
|
|
2012-09-20 09:55:58 +02:00
|
|
|
file { '/etc/apt/preferences':
|
2013-01-02 14:12:11 +01:00
|
|
|
ensure => present,
|
|
|
|
alias => 'apt_config',
|
2010-10-17 13:58:59 +02:00
|
|
|
# only update together
|
2012-09-20 09:55:58 +02:00
|
|
|
content => $pref_contents,
|
2013-01-02 14:12:11 +01:00
|
|
|
require => File['/etc/apt/sources.list'],
|
2013-03-15 20:28:25 +01:00
|
|
|
owner => root, group => 0, mode => '0644';
|
2010-10-17 13:58:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|