# Unable to pass dict as a parameter in the ansible module

**URL:** <https://forum.ansible.com/t/unable-to-pass-dict-as-a-parameter-in-the-ansible-module/18365>\
**Category:** Ansible Project\
**Created:** [June 1, 2015, 9:44am UTC](https://forum.ansible.com/t/unable-to-pass-dict-as-a-parameter-in-the-ansible-module/18365 "2015-06-01T09:44:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dheeraj\_Panyam](https://avatars.discourse-cdn.com/v4/letter/d/ea666f/32.png) [@Dheeraj\_Panyam](https://forum.ansible.com/u/Dheeraj_Panyam)\
**Post date:** [June 1, 2015, 9:44am UTC](https://forum.ansible.com/t/unable-to-pass-dict-as-a-parameter-in-the-ansible-module/18365/1 "2015-06-01T09:44:55Z")

</div>

I am trying to pass a dict as a parameter in the Ansible Module but it is giving me error “{“msg”: “unable to evaluate dictionary for devices”, “failed”: true}”

Devices is the parameter below which i am trying to pass, please help

ansible/hacking/test-module -m /usr/share/ansible/monitoring/my\_maintenance.py -a “schedule\_type=“One-Time” devices=”{“hostName”:“HYDLPT326”}" start\_time=2015-06-01T16:00:00+0000 end\_time=2015-06-01T16:30:00+0000 timezone=“Asia/Calcutta” client\_id=client\_2655"

O/p is below

---

<div class="post-metadata">

**Author:** ![Lowell\_Alleman](https://avatars.discourse-cdn.com/v4/letter/l/e8c25b/32.png) [@Lowell\_Alleman](https://forum.ansible.com/u/Lowell_Alleman)\
**Post date:** [June 13, 2015, 4:53pm UTC](https://forum.ansible.com/t/unable-to-pass-dict-as-a-parameter-in-the-ansible-module/18365/2 "2015-06-13T16:53:15Z")

</div>

I was running into the same issue, and your post helped me out.

Looks like a quoting issue. I’ve escaped some of the double-quotes and switched to single quotes inside the dictionary. Maybe try this:

test-module -m /usr/share/ansible/monitoring/my\_maintenance.py -a “schedule\_type=One-Time devices="{‘hostName’:‘HYDLPT326’}" start\_time=2015-06-01T16:00:00+0000 end\_time=2015-06-01T16:30:00+0000 timezone=‘Asia/Calcutta’ client\_id=client\_2655”

I was missing the double-quotes around the dictionary.

Good luck!
