2018-06-25 11:23:20 +00:00
|
|
|
---
|
|
|
|
- name: "Get existing Heketi deploy resources."
|
2018-07-30 15:44:02 +00:00
|
|
|
command: "{{ bin_dir }}/kubectl get all --selector=\"deploy-heketi\" -o=json"
|
2018-06-25 11:23:20 +00:00
|
|
|
register: "heketi_resources"
|
|
|
|
changed_when: false
|
|
|
|
- name: "Delete bootstrap Heketi."
|
2018-07-30 15:44:02 +00:00
|
|
|
command: "{{ bin_dir }}/kubectl delete all,service,jobs,deployment,secret --selector=\"deploy-heketi\""
|
2018-06-25 11:23:20 +00:00
|
|
|
when: "heketi_resources.stdout|from_json|json_query('items[*]')|length > 0"
|
2020-07-27 13:24:17 +00:00
|
|
|
- name: "Ensure there is nothing left over." # noqa 301
|
2018-07-30 15:44:02 +00:00
|
|
|
command: "{{ bin_dir }}/kubectl get all,service,jobs,deployment,secret --selector=\"deploy-heketi\" -o=json"
|
2018-06-25 11:23:20 +00:00
|
|
|
register: "heketi_result"
|
|
|
|
until: "heketi_result.stdout|from_json|json_query('items[*]')|length == 0"
|
2018-07-05 00:14:36 +00:00
|
|
|
retries: 60
|
2018-06-25 11:23:20 +00:00
|
|
|
delay: 5
|