diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-01-18 10:51:59 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-01-18 10:51:59 -0200 |
commit | c2219fa645251599b797b2574e6a68212d676f66 (patch) | |
tree | b2b5cb63bee1abc3f2ae31b81cd417b292355b6c /manifests/preferences.pp | |
parent | 8bfd579a82b6f824b0184bb2e33a384254426eec (diff) | |
parent | 14670466be5eceba043e697d5f6f0f0ada9d5b07 (diff) | |
download | puppet-apt-c2219fa645251599b797b2574e6a68212d676f66.tar.gz puppet-apt-c2219fa645251599b797b2574e6a68212d676f66.tar.bz2 |
Merge branch 'master' of git://labs.riseup.net/shared-apt
Conflicts:
templates/Ubuntu/sources.list.erb
Diffstat (limited to 'manifests/preferences.pp')
-rw-r--r-- | manifests/preferences.pp | 24 |
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'; } } |