summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp108
1 files changed, 64 insertions, 44 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 96ab2db..1af6e1f 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -11,6 +11,11 @@ class apt {
default => $apt_clean,
}
+ $backports_enabled = $backports_enabled ? {
+ '' => 'false',
+ default => $backports_enabled,
+ }
+
package { apt: ensure => installed }
# a few templates need lsbdistcodename
@@ -85,53 +90,68 @@ class apt {
# Another Semaphor for all packages to reference
alias => apt_updated;
}
+
+ ## This package should really always be current
+ package { "debian-archive-keyring":
+ ensure => latest,
+ }
- ## 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://$server/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://$server/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"] ]
- }
- }
+ case $backports_enabled {
+ 'true': {
+ config_file {
+ # backports
+ "/etc/apt/sources.list.d/debian-backports.list":
+ content => template("apt/sources.list.backports.erb"),
+ require => Exec[assert_lsbdistcodename];
+ }
+
+ 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://$server/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://$server/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"] ]
+ }
+ }
+ }
+
+ }
+ default: { }
}
+
+
case $custom_key_dir {
'': {
exec { "/bin/true # no_custom_keydir": }