title: Postman to Ansible URI Module Translation
body: <p>I'm able to use the following Postman POST request to initiate a Netscaler firmware upgrade.</p>
  
  <pre><code>POST: http://192.168.1.10/nitro/v1/config/install?warning=yes
  Headers: Content-Type: application/vnd.com.citrix.netscaler.install+json
  Body (JSON):
  {
      "install":{
          "url":"file:///var/nsinstall/build-13.0-41.20_nc_64/build-13.0-41.20_nc_64.tgz",
          "y":true,
          "l":false
      }
  }
  </code></pre>
  
  <p>I'm now trying to do the same using Ansible. Below is an example of a playbook in Ansible, which didn't work. Looking at a packet capture, it doesn't look like a properly formatted HTTP request gets sent by Ansible.</p>
  
  <pre><code>---
  - hosts: ns
    gather_facts: false
    tasks:
    - name: get ns config
      register: ps
      uri:
        url: http://192.168.1.10/nitro/v1/config/install
        method: POST
        return_content: yes
        headers:
          X-NITRO-USER: nsroot
          X-NITRO-PASS: nsroot
        body:
         install:
           url: "file:///var/nsinstall/12.1-54.13_nc/build-12.1-54.13_nc_64.tgz"
           y: true
           l: false
    - name:
      debug: var=ps
  </code></pre>
  
  <p>Output</p>
  
  <pre><code>**"msg": "Status code was not [200]: An unknown error occurred: must be string or buffer, not dict",**
  </code></pre>
  
  <p>How would you go about doing this?</p>
  
  <p>Thanks for any help.</p>