Skip to content

Commit

Permalink
Block start/stop on svc with provision-failed (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
rut31337 authored Aug 2, 2022
1 parent cb269e5 commit 91c1ee0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions playbooks/service-lifecycle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,19 @@
api_version: anarchy.gpte.redhat.com/v1
register: r_subject

- when: r_subject.resources[0].spec.vars.current_state.endswith('-failed') | default('unknown')
block:
- debug:
msg: "ERROR: Service current_state == 'provision-failed', cannot run {{ desired_state }} function."

- name: Write tower information to yaml file
copy:
dest: "{{ output_dir }}/results.rc"
content: |
export SKIP_TOWER_LOGS=yes
- meta: end_play

- when: r_subject.resources[0].spec.vars.current_state | default('unknown') == desired_state
block:
- debug:
Expand Down

0 comments on commit 91c1ee0

Please sign in to comment.