# tower\_credential module is failing

**URL:** <https://forum.ansible.com/t/tower-credential-module-is-failing/28916>\
**Category:** Ansible Project\
**Created:** [November 1, 2018, 6:58am UTC](https://forum.ansible.com/t/tower-credential-module-is-failing/28916 "2018-11-01T06:58:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vinod\_Patil](https://avatars.discourse-cdn.com/v4/letter/v/ce73a5/32.png) [@Vinod\_Patil](https://forum.ansible.com/u/Vinod_Patil)\
**Post date:** [November 1, 2018, 6:58am UTC](https://forum.ansible.com/t/tower-credential-module-is-failing/28916/1 "2018-11-01T06:58:22Z")

</div>

Hi ,

I am using tower\_credential module to create a credential on ansible tower.

Ansible tower version 3.3.0  
ansible tower CLI verison 3.3.0

ansible module used - tower\_credential

However I am getting the error -

fatal: [XXXXXXXXX.hsbc]: FAILED! =\> {“changed”: false, “failed”: true, “module\_stderr”: “Shared connection to XXXXXXXXX.hsbc closed.\r\n”, “module\_stdout”: “Traceback (most recent call last):\r\n File "/tmp/ansible\_4Vbytv/ansible\_module\_tower\_credential.py", line 292, in \r\n main()\r\n File "/tmp/ansible\_4Vbytv/ansible\_module\_tower\_credential.py", line 277, in main\r\n result = credential.modify(\*\*params)\r\n File "/opt/ansible/20171031/python/lib/python2.7/site-packages/tower\_cli/models/base.py", line 698, in modify\r\n return self.write(pk, create\_on\_missing=create\_on\_missing, force\_on\_exists=True, \*\*kwargs)\r\n File "/opt/ansible/20171031/python/lib/python2.7/site-packages/tower\_cli/models/base.py", line 378, in write\r\n raise exc.BadRequest(‘Missing required fields: %s’ % ‘, ‘.join(missing\_fields).replace(’\_’, ‘-’))\r\ntower\_cli.exceptions.BadRequest: Missing required fields: credential-type\r\n”, “msg”: “MODULE FAILURE”, “rc”: 0}

Can anyone please help here.  
Red hat has clearly denied to support saying that this is community support and raise it there.

Thanks,  
Vinod

---

<div class="post-metadata">

**Author:** ![Ankit2](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Ankit2](https://forum.ansible.com/u/Ankit2)\
**Post date:** [November 1, 2018, 9:17am UTC](https://forum.ansible.com/t/tower-credential-module-is-failing/28916/2 "2018-11-01T09:17:58Z")

</div>

Did you notice it says, tower\_cli.exceptions.BadRequest: Missing required fields: credential-type

Have you selected the credentials type?

---

<div class="post-metadata">

**Author:** ![Vinod\_Patil](https://avatars.discourse-cdn.com/v4/letter/v/ce73a5/32.png) [@Vinod\_Patil](https://forum.ansible.com/u/Vinod_Patil)\
**Post date:** [November 1, 2018, 10:10am UTC](https://forum.ansible.com/t/tower-credential-module-is-failing/28916/3 "2018-11-01T10:10:34Z")

</div>

Yes i have used the “kind” option. Verified that i am using all required options of tower\_credential

---

<div class="post-metadata">

**Author:** ![Jonathan\_Lozada\_De\_L](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Jonathan\_Lozada\_De\_L](https://forum.ansible.com/u/Jonathan_Lozada_De_L)\
**Post date:** [November 1, 2018, 11:11am UTC](https://forum.ansible.com/t/tower-credential-module-is-failing/28916/4 "2018-11-01T11:11:55Z")

</div>

as far as I know that module does not work with versions newer than 3.1
