summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp35
1 files changed, 15 insertions, 20 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 85cab9f..8136f25 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -5,6 +5,8 @@
class apt {
+ import "custom_sources.pp"
+
# See README
$real_apt_clean = $apt_clean ? {
'' => 'auto',
@@ -124,28 +126,21 @@ class apt {
package { "debian-archive-keyring": ensure => latest }
# backports uses the normal archive key now
package { "debian-backports-keyring": ensure => absent }
-
- case $custom_key_dir {
- '': {
- exec { "/bin/true # no_custom_keydir": }
+
+ if $custom_key_dir {
+ file { "${apt_base_dir}/keys.d":
+ source => "$custom_key_dir",
+ recurse => true,
+ mode => 0755, owner => root, group => root,
}
- default: {
- file { "${apt_base_dir}/keys.d":
- source => "$custom_key_dir",
- recurse => true,
- mode => 0755, owner => root, group => root,
- }
- exec { "find ${apt_base_dir}/keys.d -type f -exec apt-key add '{}' \\; && apt-get update":
- alias => "custom_keys",
- subscribe => File["${apt_base_dir}/keys.d"],
- refreshonly => true,
- before => Config_file["apt_config"];
- }
+ exec { "find ${apt_base_dir}/keys.d -type f -exec apt-key add '{}' \\; && apt-get update":
+ alias => "custom_keys",
+ subscribe => File["${apt_base_dir}/keys.d"],
+ refreshonly => true,
+ before => Config_file[apt_config];
}
}
# workaround for preseeded_package component
- file { "/var/cache": ensure => directory }
- file { "/var/cache/local": ensure => directory }
- file { "/var/cache/local/preseeding": ensure => directory }
-}
+ file { [ "/var/cache", "/var/cache/local", "/var/cache/local/preseeding" ]: ensure => directory }
+}