diff options
Diffstat (limited to 'roles/ands_kaas/tasks/templates.yml')
-rw-r--r-- | roles/ands_kaas/tasks/templates.yml | 8 |
1 files changed, 5 insertions, 3 deletions
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 |