-
Notifications
You must be signed in to change notification settings - Fork 107
/
main.yml
33 lines (28 loc) · 1023 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
- name: Deploy applications
when:
- specification.applications is defined
- specification.applications | length > 0
block:
- name: Wait until cluster is available
include_tasks: wait-for-cluster.yml
- &cleanup
name: Remove temporary directory (root)
file:
path: "{{ deployment_tmp_root_dir }}"
state: absent
- name: Include applications
include_tasks: applications/{{ data.name }}/main.yml
no_log: true # Do not log provided credentials
loop_control:
loop_var: data
loop: "{{ _enabled_applications }}"
vars:
_defined: >-
{{ specification.applications | selectattr('enabled', 'defined') | list }}
_undefined: >-
{{ specification.applications | selectattr('enabled', 'undefined') | list }}
# Respect user's conscious decisions, otherwise enable by default
_enabled_applications: >-
{{ (_defined | selectattr('enabled') | list) + _undefined }}
- *cleanup