From 00793c92215942ae14b227310b65e7e115d9b413 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Karl-Heinz=20Preu=C3=9F?= Date: Thu, 26 Nov 2020 10:48:49 +0100 Subject: [PATCH] fix broken ceph-fetch-keys role MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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) --- generate_group_vars_sample.sh | 2 +- roles/ceph-fetch-keys/defaults/main.yml | 11 +++++++++++ roles/ceph-fetch-keys/tasks/main.yml | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 roles/ceph-fetch-keys/defaults/main.yml 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 -- 2.39.5