# ISE 2.4 : Ansible Tower and ERS : header issue

**URL:** <https://forum.ansible.com/t/ise-2-4-ansible-tower-and-ers-header-issue/30485>\
**Category:** Ansible Project\
**Created:** [June 4, 2019, 8:05am UTC](https://forum.ansible.com/t/ise-2-4-ansible-tower-and-ers-header-issue/30485 "2019-06-04T08:05:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gilles](https://avatars.discourse-cdn.com/v4/letter/g/ce7236/32.png) [@Gilles](https://forum.ansible.com/u/Gilles)\
**Post date:** [June 4, 2019, 8:05am UTC](https://forum.ansible.com/t/ise-2-4-ansible-tower-and-ers-header-issue/30485/1 "2019-06-04T08:05:11Z")

</div>

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:

```auto
---
- 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:

```auto
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

---

<div class="post-metadata">

**Author:** ![Gilles](https://avatars.discourse-cdn.com/v4/letter/g/ce7236/32.png) [@Gilles](https://forum.ansible.com/u/Gilles)\
**Post date:** [June 21, 2019, 7:51am UTC](https://forum.ansible.com/t/ise-2-4-ansible-tower-and-ers-header-issue/30485/2 "2019-06-21T07:51:36Z")

</div>

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 ?
