From d0023c418f21c0d774ad996fcbe4a5a2ab246d8b Mon Sep 17 00:00:00 2001 From: David Alisch Date: Thu, 9 Jun 2016 15:51:06 -0600 Subject: [PATCH] re-introduced management of base $file_keystorage_dir (it was originally working after this PR: https://github.com/voxpupuli/puppet-rundeck/pull/172), not sure when this broke. --- manifests/config/file_keystore.pp | 1 + spec/classes/config/global/file_keystore_spec.rb | 3 +++ 2 files changed, 4 insertions(+) diff --git a/manifests/config/file_keystore.pp b/manifests/config/file_keystore.pp index 81c970920..055c6deea 100644 --- a/manifests/config/file_keystore.pp +++ b/manifests/config/file_keystore.pp @@ -61,6 +61,7 @@ validate_re($data_type, [ 'password', 'public', 'private' ]) validate_re($content_type, [ 'application/x-rundeck-data-password', 'application/pgp-keys', 'application/octet-stream' ]) + ensure_resource('file', [ $file_keystorage_dir ], { 'ensure' => 'directory' }) if !$content_size { $content_size_value = size($value) diff --git a/spec/classes/config/global/file_keystore_spec.rb b/spec/classes/config/global/file_keystore_spec.rb index 36c4bd846..c3f4cfa2f 100644 --- a/spec/classes/config/global/file_keystore_spec.rb +++ b/spec/classes/config/global/file_keystore_spec.rb @@ -31,6 +31,9 @@ } end + # base key storage directory needs to be there first + it { should contain_file('/var/lib/rundeck/var/storage') } + # content and meta data for passwords it { should contain_file('/var/lib/rundeck/var/storage/content/keys/foo/bar/password_key.password').with_content(/gobbledygook/) } it { should contain_file('/var/lib/rundeck/var/storage/meta/keys/foo/bar/password_key.password').with_content(%r{application/x-rundeck-data-password}) }