wait for job to complete
This commit is contained in:
parent
318c69350e
commit
306a6a751f
1 changed files with 3 additions and 1 deletions
|
@ -15,6 +15,8 @@
|
|||
- "heketi_storage_state.stdout|from_json|json_query(endpoints_query)|length == 0"
|
||||
- "heketi_storage_state.stdout|from_json|json_query(service_query)|length == 0"
|
||||
- "heketi_storage_state.stdout|from_json|json_query(job_query)|length == 0"
|
||||
register: "heketi_storage_result"
|
||||
- debug: { var: "heketi_storage_result" }
|
||||
- command: "kubectl get secrets,endpoints,services,jobs --output=json"
|
||||
register: "heketi_storage_state"
|
||||
- name: "Get state of heketi storage service, endpoint, secret and job."
|
||||
|
@ -25,7 +27,7 @@
|
|||
secret_query: "items[?metadata.name=='heketi-storage-secret' && kind=='Secret']"
|
||||
endpoints_query: "items[?metadata.name=='heketi-storage-endpoints' && kind=='Endpoints']"
|
||||
service_query: "items[?metadata.name=='heketi-storage-endpoints' && kind=='Service']"
|
||||
job_query: "items[?metadata.name=='heketi-storage-copy-job' && kind=='Job' && status.active==0]"
|
||||
job_query: "items[?metadata.name=='heketi-storage-copy-job' && kind=='Job' && status.conditions[?type=='Complete'].status=='True']"
|
||||
until:
|
||||
- "heketi_storage_state.stdout|from_json|json_query(secret_query)|length == 1"
|
||||
- "heketi_storage_state.stdout|from_json|json_query(endpoints_query)|length == 1"
|
||||
|
|
Loading…
Reference in a new issue