summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-09-15 22:31:42 +0200
committermh <mh@immerda.ch>2010-09-15 22:31:42 +0200
commit521ccfec19d40fa5d78162727afa26c15778c173 (patch)
tree6aee26dda09bb64c48a4fa9dbdc93affc7a0dced /manifests
parentdd36612e50b2c44135fa10fdc3d6120ff2b1220e (diff)
improve decision handling, remove unnecessary exec
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp29
1 files changed, 11 insertions, 18 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index af860f7..78ae6c5 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -110,27 +110,20 @@ class apt {
}
}
- 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 }
}