From 96ced00e05b50f276841a9212ae89e018de4d92d Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Fri, 16 Feb 2018 20:54:52 +0100 Subject: Updated to OpenShift 3.7 and tested --- roles/ands_kaas/tasks/templates.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'roles/ands_kaas/tasks/templates.yml') diff --git a/roles/ands_kaas/tasks/templates.yml b/roles/ands_kaas/tasks/templates.yml index 75d43f3..e1612bc 100644 --- a/roles/ands_kaas/tasks/templates.yml +++ b/roles/ands_kaas/tasks/templates.yml @@ -8,13 +8,15 @@ - "{{ role_path }}/templates/{{ kaas_template_glob | default('*') }}.j2" - "{{ kaas_project_path }}/templates/{{ kaas_template_glob | default('*') }}.j2" +#- debug: msg="{{ results }}" + - name: "Sort and execute KaaS templates" - include: "template.yml" - delegate_to: "{{ groups.masters[0] }}" + include_tasks: "template.yml" +# delegate_to: "{{ groups.masters[0] }}" run_once: true with_items: "{{ sorted_tmpl }}" vars: - sorted_tmpl: "{{ results | json_query('results[*].stdout_lines') | sum(start=[]) | map('basename') | sort | unique }}" + sorted_tmpl: "{{ (results.results[0] is defined) | ternary (results | json_query('results[*].stdout_lines') | sum(start=[]) | map('basename') | sort | unique, []) }}" loop_control: loop_var: tmpl_name -- cgit v1.2.3