Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## curl --insecure -X GET -u osc_anz_admin:welcome1 myurl_here
- {
- "uri" : "/em/cloud/iaas/server/byrequest/142" ,
- "status" : "DELETED" ,
- "canonicalLink" : "/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/iaas/server/byrequest/142"
- }
- ## cat showvmstatus.yml
- ---
- - hosts: localhost
- tasks:
- - name: show vm status
- uri:
- url: myurl_here
- method: GET
- return_contents: yes
- user: osc_anz_admin
- password: welcome1
- validate_certs: no
- force_basic_auth: yes
- register: showvmstatus
- - name: show list
- debug: var=showvmstatus
- ## ansible-playbook showvmstatus.yml
- PLAY [localhost] *************************************************************************************************************************************************************
- TASK [Gathering Facts] *******************************************************************************************************************************************************
- ok: [localhost]
- TASK [show vm status] ********************************************************************************************************************************************************
- ok: [localhost]
- TASK [show list] *************************************************************************************************************************************************************
- ok: [localhost] => {
- "showvmstatus": {
- "changed": false,
- "connection": "close",
- "content_language": "en,en-us",
- "content_type": "application/oracle.com.cloud.common.VM+json; charset=utf-8",
- "date": "Fri, 29 Sep 2017 05:22:06 GMT",
- "location": "https://em13-test.gdn.aus.osc:7803?status,uri/em/cloud/iaas/server/byrequest/142",
- "msg": "OK (unknown bytes)",
- "redirected": false,
- "server": "Oracle-HTTP-Server-12c",
- "set_cookie": "ORA_SMP_EM_AUTH_-2918986201179331800=7oDMFbBgPTaoYai-V8wrdJcyMIfzMxomyg3XKocxrlRRx49cYn-z!-989316618; path=/em; secure; HttpOnly",
- "status": 200,
- "transfer_encoding": "chunked",
- "url": "https://em13-test.gdn.aus.osc:7803/em/cloud/iaas/server/byrequest/142?status,uri",
- "x_oracle_dms_ecid": "005M^oohrB28pmNMuIQ5UH00014L0002Z^",
- "x_orcl_emoa": "true",
- "x_specification_version": "10001"
- }
- }
- PLAY RECAP *******************************************************************************************************************************************************************
- localhost : ok=3 changed=0 unreachable=0 failed=0
- ##
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement