diff options
author | mh <mh@immerda.ch> | 2010-09-15 22:31:42 +0200 |
---|---|---|
committer | mh <mh@immerda.ch> | 2010-09-15 22:31:42 +0200 |
commit | 521ccfec19d40fa5d78162727afa26c15778c173 (patch) | |
tree | 6aee26dda09bb64c48a4fa9dbdc93affc7a0dced /manifests | |
parent | dd36612e50b2c44135fa10fdc3d6120ff2b1220e (diff) |
improve decision handling, remove unnecessary exec
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 29 |
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 } } |