title: How to display same curl output on ansible?
body: <p>I have curl(and rest api) command for oracle enterprise manager IaaS and would like to generate same output when using ansible for same requests (http get). In my test environment however ansible doesn't display proper output. Please see my test script and output and any comments would be really appreciated. </p>
  
  <hr>
  
  <pre><code>## 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"
  }
  </code></pre>
  
  <hr>
  
  <pre><code>## 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
  </code></pre>
  
  <hr>
  
  <pre><code>## ansible-playbook showvmstatus.yml 
  
  PLAY [localhost] *************************************************************************************************************************************************************
  
  TASK [Gathering Facts] *******************************************************************************************************************************************************
  ok: [localhost]
  
  TASK [show vm status] ********************************************************************************************************************************************************
  ok: [localhost]
  
  TASK [show list] *************************************************************************************************************************************************************
  ok: [localhost] =&gt; {
      "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   
  ## 
  </code></pre>
  
  <hr>
  
  <p>As you can see above, no vm details displayed at all from ansible output.</p>