I need help with Converting Following URI to Ansible Task which is failing

curl -k1 -u admin:admin  -X POST 
https://10.10.2.3/wapi/v2.11.5/fileop?_function=getgriddata -H 
"Content-Type: application/json" -d {"type": "BACKUP"}"

How to specify {"type":  "BACKUP"}

    uri:
      url: "https://{{ nios_provider.host 
}}/wapi/v2.11.5/fileop?_function=getgriddata"
      method: POST
      user: "{{ infoblox_username }}"
      password: "{{ infoblox_password }}"
      force_basic_auth: yes
      headers:
        Content-Type: "application/json"
      body: '{"file_name":"{{ backup_dest }}"}'
      body_format: json
      status_code: 200
      validate_certs: no
    register: backup_result

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-devel/fdfd1950-0c05-4c9b-a73c-18740ce60f0an%40googlegroups.com.

Reply via email to