summaryrefslogtreecommitdiffstats
path: root/roles/openshift_resource/tasks/main.yml
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-03-22 05:22:13 +0100
committerSuren A. Chilingaryan <csa@suren.me>2018-03-22 05:22:13 +0100
commitcba41110aa086553192ed5a309a6b8031812c221 (patch)
tree039de23c082c82b361bfca4e7f531cbc25e49225 /roles/openshift_resource/tasks/main.yml
parent2c15edff7c36de9a856b401e4830788f92d4dfef (diff)
downloadands-cba41110aa086553192ed5a309a6b8031812c221.tar.gz
ands-cba41110aa086553192ed5a309a6b8031812c221.tar.bz2
ands-cba41110aa086553192ed5a309a6b8031812c221.tar.xz
ands-cba41110aa086553192ed5a309a6b8031812c221.zip
Fix creating empty templates
Diffstat (limited to 'roles/openshift_resource/tasks/main.yml')
-rw-r--r--roles/openshift_resource/tasks/main.yml12
1 files changed, 9 insertions, 3 deletions
diff --git a/roles/openshift_resource/tasks/main.yml b/roles/openshift_resource/tasks/main.yml
index 8606aa3..086ab2b 100644
--- a/roles/openshift_resource/tasks/main.yml
+++ b/roles/openshift_resource/tasks/main.yml
@@ -23,9 +23,15 @@
when:
- tmpl.kind == "Template"
- strategy == "auto"
-
+
+# With results it populates empty templates....
- name: "Creating template/resources defined in {{ template }}"
include_tasks: resource.yml
- when: results | skipped
-
+ vars:
+ metadata: "{{ tmpl.metadata | default({}) }}"
+ annotations: "{{ metadata.annotations | default({}) }}"
+ strategy: "{{ annotations['kaas/strategy'] | default('auto') }}"
+ when: (tmpl.kind != "Template") or (strategy != "auto")
+# when: results | skipped
+
run_once: true