aboutsummaryrefslogtreecommitdiff
path: root/manifests/preferences.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/preferences.pp')
-rw-r--r--manifests/preferences.pp24
1 files changed, 11 insertions, 13 deletions
diff --git a/manifests/preferences.pp b/manifests/preferences.pp
index f188149..9ed24c1 100644
--- a/manifests/preferences.pp
+++ b/manifests/preferences.pp
@@ -1,22 +1,20 @@
class apt::preferences {
- concat::fragment{"apt_preferences_header":
- content => $custom_preferences ? {
- '' => $operatingsystem ? {
- 'debian' => template("apt/${operatingsystem}/preferences_${codename}.erb"),
- 'ubuntu' => template("apt/${operatingsystem}/preferences_${codename}.erb"),
- },
- default => $custom_preferences
+ $pref_contents = $apt::custom_preferences ? {
+ '' => $::operatingsystem ? {
+ 'debian' => template("apt/${::operatingsystem}/preferences_${apt::codename}.erb"),
+ 'ubuntu' => template("apt/${::operatingsystem}/preferences_${apt::codename}.erb"),
},
- order => 00,
- target => '/etc/apt/preferences',
+ default => $apt::custom_preferences
}
- concat{'/etc/apt/preferences':
- alias => apt_config,
+ file { '/etc/apt/preferences':
+ ensure => present,
+ alias => 'apt_config',
# only update together
- require => File["/etc/apt/sources.list"],
- owner => root, group => 0, mode => 0644;
+ content => $pref_contents,
+ require => File['/etc/apt/sources.list'],
+ owner => root, group => 0, mode => '0644';
}
}