]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
fix broken ceph-fetch-keys role
authorKarl-Heinz Preuß <karl-heinz.preuß@cms.hu-berlin.de>
Thu, 26 Nov 2020 09:48:49 +0000 (10:48 +0100)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Mon, 14 Dec 2020 16:42:50 +0000 (11:42 -0500)
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ß <karl-heinz.preuss@cms.hu-berlin.de>
(cherry picked from commit 6ce34ef59fe33874ae7876d27b991e23c6281fdb)

generate_group_vars_sample.sh
roles/ceph-fetch-keys/defaults/main.yml [new file with mode: 0644]
roles/ceph-fetch-keys/tasks/main.yml

index 3a45ff380feaa21c0e90edb103dd6dbb44d659d1..eda9b339b55db956c2d4cb6988ffcfdd50419e67 100755 (executable)
@@ -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 (file)
index 0000000..f8ac0ba
--- /dev/null
@@ -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/
+
index 7fcb606f1e25a9c93d4c8ddaaac8ecb61a2ac0d3..6f56738831f1dad655cc35309a351e3fa37dfeee 100644 (file)
@@ -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