Advertisement
Guest User

Untitled

a guest
Sep 29th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1. ## curl --insecure -X GET -u osc_anz_admin:welcome1 myurl_here
  2. {
  3. "uri" : "/em/cloud/iaas/server/byrequest/142" ,
  4. "status" : "DELETED" ,
  5. "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/iaas/server/byrequest/142"
  6. }
  7.  
  8. ## cat showvmstatus.yml
  9. ---
  10. - hosts: localhost
  11. tasks:
  12. - name: show vm status
  13. uri:
  14. url: myurl_here
  15. method: GET
  16. return_contents: yes
  17. user: osc_anz_admin
  18. password: welcome1
  19. validate_certs: no
  20. force_basic_auth: yes
  21. register: showvmstatus
  22. - name: show list
  23. debug: var=showvmstatus
  24.  
  25. ## ansible-playbook showvmstatus.yml
  26.  
  27. PLAY [localhost] *************************************************************************************************************************************************************
  28.  
  29. TASK [Gathering Facts] *******************************************************************************************************************************************************
  30. ok: [localhost]
  31.  
  32. TASK [show vm status] ********************************************************************************************************************************************************
  33. ok: [localhost]
  34.  
  35. TASK [show list] *************************************************************************************************************************************************************
  36. ok: [localhost] => {
  37. "showvmstatus": {
  38. "changed": false,
  39. "connection": "close",
  40. "content_language": "en,en-us",
  41. "content_type": "application/oracle.com.cloud.common.VM+json; charset=utf-8",
  42. "date": "Fri, 29 Sep 2017 05:22:06 GMT",
  43. "location": "https://em13-test.gdn.aus.osc:7803?status,uri/em/cloud/iaas/server/byrequest/142",
  44. "msg": "OK (unknown bytes)",
  45. "redirected": false,
  46. "server": "Oracle-HTTP-Server-12c",
  47. "set_cookie": "ORA_SMP_EM_AUTH_-2918986201179331800=7oDMFbBgPTaoYai-V8wrdJcyMIfzMxomyg3XKocxrlRRx49cYn-z!-989316618; path=/em; secure; HttpOnly",
  48. "status": 200,
  49. "transfer_encoding": "chunked",
  50. "url": "https://em13-test.gdn.aus.osc:7803/em/cloud/iaas/server/byrequest/142?status,uri",
  51. "x_oracle_dms_ecid": "005M^oohrB28pmNMuIQ5UH00014L0002Z^",
  52. "x_orcl_emoa": "true",
  53. "x_specification_version": "10001"
  54. }
  55. }
  56.  
  57. PLAY RECAP *******************************************************************************************************************************************************************
  58. localhost : ok=3 changed=0 unreachable=0 failed=0
  59. ##
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement