riteshchikatwar

Untitled

Dec 12th, 2019
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. - name: Get cluster info
  2. ovirt_cluster_facts:
  3. auth: "{{ ovirt_auth }}"
  4. pattern: "name={{ cluster_name }}"
  5. fetch_nested: yes
  6. check_mode: "no"
  7. register: cluster_info
  8.  
  9. - name: Set cluster upgrade status in progress
  10. no_log: false
  11. uri:
  12. url: "{{ ovirt_auth.url }}/clusters/{{ ovirt_clusters[0].id }}/upgrade"
  13. method: POST
  14. body_format: json
  15. validate_certs: false
  16. headers:
  17. Authorization: "Bearer {{ ovirt_auth.token }}"
  18. body:
  19. upgrade_action: start
  20. register: upgrade_set
  21. when: api_info.ovirt_api.product_info.version.major >= 4 and api_info.ovirt_api.product_info.version.minor >= 3
  22.  
  23. - name: Get Host volumes with valid
  24. no_log: false
  25. uri:
  26. url: "{{ ovirt_auth.url }}/clusters/{{ ovirt_clusters[0].id }}/glustervolumes"
  27. method: GET
  28. body_format: json
  29. validate_certs: false
  30. return_content: yes
  31. headers:
  32. Authorization: "Bearer {{ ovirt_auth.token }}"
  33. register: json
  34. when: ovirt_clusters[0].gluster_service == True
Advertisement
Add Comment
Please, Sign In to add comment