From: Karl-Heinz Preuß Date: Thu, 26 Nov 2020 09:48:49 +0000 (+0100) Subject: fix broken ceph-fetch-keys role X-Git-Tag: v4.0.42~25 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=00793c92215942ae14b227310b65e7e115d9b413;p=ceph-ansible.git fix broken ceph-fetch-keys role set fetch_directory variable in default/main.yml instead of using the defaults jinja filter in tasks/main.yml. Fixes: #6072 Signed-off-by: Karl-Heinz Preuß (cherry picked from commit 6ce34ef59fe33874ae7876d27b991e23c6281fdb) --- diff --git a/generate_group_vars_sample.sh b/generate_group_vars_sample.sh index 3a45ff380..eda9b339b 100755 --- a/generate_group_vars_sample.sh +++ b/generate_group_vars_sample.sh @@ -7,7 +7,7 @@ set -euo pipefail ############# basedir=$(dirname "$0") -do_not_generate="ceph-common$|ceph-container-common$" # pipe separated list of roles we don't want to generate sample file, MUST end with '$', e.g: 'foo$|bar$' +do_not_generate="(ceph-common|ceph-container-common|ceph-fetch-keys)$" # pipe separated list of roles we don't want to generate sample file, MUST end with '$', e.g: 'foo$|bar$' ############# diff --git a/roles/ceph-fetch-keys/defaults/main.yml b/roles/ceph-fetch-keys/defaults/main.yml new file mode 100644 index 000000000..f8ac0ba5f --- /dev/null +++ b/roles/ceph-fetch-keys/defaults/main.yml @@ -0,0 +1,11 @@ +--- +# Variables here are applicable to all host groups NOT roles + +# This sample file generated by generate_group_vars_sample.sh + +# Dummy variable to avoid error because ansible does not recognize the +# file as a good configuration file when no variable in it. +dummy: + +fetch_directory: fetch/ + diff --git a/roles/ceph-fetch-keys/tasks/main.yml b/roles/ceph-fetch-keys/tasks/main.yml index 76b4c7d9e..a795f896c 100644 --- a/roles/ceph-fetch-keys/tasks/main.yml +++ b/roles/ceph-fetch-keys/tasks/main.yml @@ -6,7 +6,7 @@ - name: create a local fetch directory if it does not exist file: - path: "{{ fetch_directory | default('fetch/') }}" + path: "{{ fetch_directory }}" state: directory delegate_to: localhost become: false