Skip to content

Commit

Permalink
[kustomize_deploy] Make wait conditions optional
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pablintino committed Nov 28, 2024
1 parent b794aa2 commit a65c97a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions roles/kustomize_deploy/tasks/execute_step.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
- stage is defined
- stage_id is defined
- stage['path'] is defined
- stage['wait_conditions'] is defined
- stage['wait_conditions'] | length > 0
- stage['values'] is defined
- stage['values'] | length > 0
- stage['build_output'] is defined
Expand Down Expand Up @@ -40,7 +38,7 @@
quiet: true
ignore_errors: true # noqa: ignore-errors
register: _builtin_wait_cond_result
loop: "{{ stage.wait_conditions }}"
loop: "{{ stage.wait_conditions | default([]) }}"

- name: Check wait_conditions validation result
when:
Expand All @@ -52,7 +50,7 @@
- name: Set stage_wait_conditions fact
ansible.builtin.set_fact:
_wait_conditions: "{{ stage.wait_conditions + _custom_conditions }}"
_wait_conditions: "{{ (stage.wait_conditions | default([])) + _custom_conditions }}"

- name: Group tasks under the same tags
vars:
Expand Down

0 comments on commit a65c97a

Please sign in to comment.