Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. - name: Verify whether the PVC is created
  2. command: "kubectl get pvc {{pvc_name}} -o json"
  3. register: result
  4.  
  5. - set_fact:
  6. pvcstatus: "{{ result.stdout|from_json }}"
  7.  
  8. - debug: var=pvcstatus
  9.  
  10. - name: check the pvc status
  11. debug:
  12. msg: "PVC status is {{pvcstatus.status.phase}}"
  13. failed_when: 'pvcstatus.status.phase is not "Bound"'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement