blob: 2c516656714e6f7ee3e7322c9dfd8b77b583afd5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
- block:
- name: Lookup the specified resource
command: "oc get -n {{project}} {{resource}}"
register: result
failed_when: false
changed_when: result is failed
- name: Detroy existing resources
command: "oc delete -n {{project}} {{resource}}"
failed_when: false
when: (recreate|default(false))
- name: Executing command
command: "oc -n {{ project }} {{ command }}"
when: (recreate|default(false)) or (result is changed)
run_once: true
|