Skip to content

Commit a65c97a

Browse files
committed
[kustomize_deploy] Make wait conditions optional
In some ocassions, like when applying more than one nodesets the user may not want to wait for the first one to be applied and wait for all of them at once when all are applied. This change is about not forcing the user, for no reason, to run a command to wait for a condition after some `oc apply` has been done.
1 parent b794aa2 commit a65c97a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

roles/kustomize_deploy/tasks/execute_step.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
- stage is defined
66
- stage_id is defined
77
- stage['path'] is defined
8-
- stage['wait_conditions'] is defined
9-
- stage['wait_conditions'] | length > 0
108
- stage['values'] is defined
119
- stage['values'] | length > 0
1210
- stage['build_output'] is defined
@@ -40,7 +38,7 @@
4038
quiet: true
4139
ignore_errors: true # noqa: ignore-errors
4240
register: _builtin_wait_cond_result
43-
loop: "{{ stage.wait_conditions }}"
41+
loop: "{{ stage.wait_conditions | default([]) }}"
4442

4543
- name: Check wait_conditions validation result
4644
when:
@@ -52,7 +50,7 @@
5250
5351
- name: Set stage_wait_conditions fact
5452
ansible.builtin.set_fact:
55-
_wait_conditions: "{{ stage.wait_conditions + _custom_conditions }}"
53+
_wait_conditions: "{{ (stage.wait_conditions | default([])) + _custom_conditions }}"
5654

5755
- name: Group tasks under the same tags
5856
vars:

0 commit comments

Comments
 (0)