ISE 2.4 : Ansible Tower and ERS : header issue

Has anyone worked with Ansible Tower and the ISE Tacacs server to query or add a network device ? It works using the ERS, but it failed when I use a playbook. It seems that it is a header issue.

FYI: the same http command works with Postman with the same headers.

Here is the test playbook I am using:

---
- hosts: ISE
  connection: local
  tasks:
    - name: check ISE 
      uri:
        url: https://Z.Z.Z.Z:9060/ers/config/networkdevice/?filter=name.EQ.WWW-FR-CHAMPIGNY-GMPLS-R-2
        user: xxx
        password: yyy
        type: application/json
        "headers": {accept-type: application/json,content-type: application/json}
        force_basic_auth: yes
        force: yes
        validate_certs: no
        method: GET
        status_code: 200

`

`

Here is the error message that I get about an illegal header:

fatal: [ISE]: FAILED! => {
    "cache_control": "no-cache, no-store, must-revalidate", 
    "changed": false, 
    "connection": "close", 
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?><ns3:ersResponse operation=\"GET-getAll-networkdevice\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:ns3=\"ers.ise.cisco.com\"><link rel=\"related\" href=\"https://Z.Z.Z.Z:9060/ers/config/networkdevice/?filter=name.EQ.WWW-FR-CHAMPIGNY-GMPLS-R-2\" type=\"application/xml\"/><messages><message type=\"ERROR\" code=\"Resource media type exception\"><title>Illeagal Request Header:  one or more of 'accept' / 'content-type' / 'ers-media-type' headers is not supported.</title></message></messages></ns3:ersResponse>", 
    "content_length": "562", 
    "content_type": "application/xml;charset=utf-8", 
    "date": "Mon, 03 Jun 2019 13:19:01 GMT", 
    "expires": "Thu, 01 Jan 1970 00:00:00 GMT",…

`

`

Any clue ?

Thanks

Gilles

It seems that whatever “headers” I configure, Tower always translates it into :

`

“headers”: {
“content-type”: “application/json”,
“accept-type”: “application/json”
}

`
and the ISE needs only :

{ "accept": "application/json", "content-type": "application/json" }

Do you know a way to override the headers ?