]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
nameserver: Don't require secrets 553/head
authorDavid Galloway <dgallowa@redhat.com>
Sun, 22 Mar 2020 14:39:49 +0000 (10:39 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Sun, 22 Mar 2020 14:41:14 +0000 (10:41 -0400)
secrets/nameserver.yml is only required if we're using DDNS

Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/nameserver/tasks/main.yml
roles/nameserver/vars/empty.yml [new file with mode: 0644]

index dbd83f34b2b8ce46fba864db9256eb31d36b04b7..2abf5c83bcbd96bbaba5e68865f0c4870eb22b3d 100644 (file)
@@ -1,7 +1,10 @@
 ---
 - name: Include secrets
-  include_vars: "{{ secrets_path | mandatory }}/nameserver.yml"
+  include_vars: "{{ item }}"
   no_log: true
+  with_first_found:
+    - "{{ secrets_path | mandatory }}/nameserver.yml"
+    - empty.yml
   tags:
     - always
 
diff --git a/roles/nameserver/vars/empty.yml b/roles/nameserver/vars/empty.yml
new file mode 100644 (file)
index 0000000..c6f9b19
--- /dev/null
@@ -0,0 +1,7 @@
+---
+# This is empty on purpose.  Used as the last line
+# when using include_vars with with_first_found when
+# the var file might not exist.
+#
+# Maybe related issue:
+# https://github.com/ansible/ansible/issues/10000