aboutsummaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp70
1 files changed, 19 insertions, 51 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 9c33b4d..1011e65 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -31,16 +31,19 @@ class apt {
}
}
+ config_file {
+ # little default settings which keep the system sane
+ "/etc/apt/apt.conf.d/from_puppet":
+ content => "APT::Get::Show-Upgraded true;\nDSelect::Clean $real_apt_clean;\n",
+ before => Concatenated_file['/etc/apt/preferences'];
+ }
+
case $custom_preferences {
- '': {
- include apt::default_preferences
+ false: {
+ include apt::preferences::absent
}
default: {
- config_file { "/etc/apt/preferences":
- content => $custom_preferences,
- alias => apt_config,
- require => File["/etc/apt/sources.list"];
- }
+ include apt::preferences
}
}
@@ -59,58 +62,23 @@ class apt {
'refresh_apt':
command => '/usr/bin/apt-get update && sleep 1',
refreshonly => true,
- subscribe => [ File["/etc/apt/sources.list"],
- File["/etc/apt/preferences"],
- File["/etc/apt/apt.conf.d"],
- Config_file[apt_config] ];
+ subscribe => File['/etc/apt/sources.list',
+ '/etc/apt/apt.conf.d',
+ '/etc/apt/preferences'];
'update_apt':
command => '/usr/bin/apt-get update && /usr/bin/apt-get autoclean',
- require => [ File["/etc/apt/sources.list"],
- File["/etc/apt/preferences"], Config_file[apt_config] ],
+ require => File['/etc/apt/sources.list',
+ '/etc/apt/preferences'],
loglevel => info,
# Another Semaphor for all packages to reference
- alias => apt_updated;
+ alias => "apt_updated";
}
## This package should really always be current
package { "debian-archive-keyring": ensure => latest }
-
- case $lsbdistcodename {
- etch: {
- package { "debian-backports-keyring": ensure => latest }
-
- # This key was downloaded from
- # http://backports.org/debian/archive.key
- # and is needed to bootstrap the backports trustpath
- file { "${apt_base_dir}/backports.org.key":
- source => "puppet:///modules/apt/backports.org.key",
- mode => 0444, owner => root, group => root,
- }
- exec { "/usr/bin/apt-key add ${apt_base_dir}/backports.org.key && apt-get update":
- alias => "backports_key",
- refreshonly => true,
- subscribe => File["${apt_base_dir}/backports.org.key"],
- before => [ File[apt_config], Package["debian-backports-keyring"] ]
- }
- }
- lenny: {
- package { "debian-backports-keyring": ensure => latest }
- # This key was downloaded from
- # http://backports.org/debian/archive.key
- # and is needed to bootstrap the backports trustpath
- file { "${apt_base_dir}/backports.org.key":
- source => "puppet:///modules/apt/backports.org.key",
- mode => 0444, owner => root, group => root,
- }
- exec { "/usr/bin/apt-key add ${apt_base_dir}/backports.org.key && apt-get update":
- alias => "backports_key",
- refreshonly => true,
- subscribe => File["${apt_base_dir}/backports.org.key"],
- before => [ Config_file[apt_config], Package["debian-backports-keyring"] ]
- }
- }
- }
+ # backports uses the normal archive key now
+ package { "debian-backports-keyring": ensure => absent }
if $custom_key_dir {
file { "${apt_base_dir}/keys.d":
@@ -122,7 +90,7 @@ class apt {
alias => "custom_keys",
subscribe => File["${apt_base_dir}/keys.d"],
refreshonly => true,
- before => Config_file[apt_config];
+ before => Concatenated_file[apt_config];
}
}