# dict object has no attribute 'json'"} Ansible Error

**URL:** <https://forum.ansible.com/t/dict-object-has-no-attribute-json-ansible-error/30435>\
**Category:** Ansible Project\
**Created:** [May 28, 2019, 11:56am UTC](https://forum.ansible.com/t/dict-object-has-no-attribute-json-ansible-error/30435 "2019-05-28T11:56:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deva\_Krishnan](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@Deva\_Krishnan](https://forum.ansible.com/u/Deva_Krishnan)\
**Post date:** [May 28, 2019, 11:56am UTC](https://forum.ansible.com/t/dict-object-has-no-attribute-json-ansible-error/30435/1 "2019-05-28T11:56:39Z")

</div>

Hi @ansible folks,

Recently I found an Ansible error while installing Opnfv-Apex. I’m getting the below error message while deploying. It seems to be Ansible playbook failed error.

**Error Message :**

_2**019-05-27 20:45:16,635 INFO: TASK [include\_tasks] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\***_  
_ **task path: /usr/share/opnfv-apex/ansible/playbooks/prepare\_overcloud\_containers.yml:31** _  
_**fatal: [192.168.122.244]: FAILED! =\> {“msg”: "The conditional check ‘item in (response.json)[‘repositories’]|join(" ")’ failed. The error was: error while evaluating conditional (item in (response.json)[‘repositories’]|join(" ")): ‘dict object’ has no attribute ‘json’**_

_ **The error appears to be in ‘/usr/share/opnfv-apex/ansible/playbooks/prepare\_overcloud\_containers.yml’: line 31, column 7, but may** _  
_ **be elsewhere in the file depending on the exact syntax problem.** _

_ **The offending line appears to be:** _

_ **register: response** _  
_ **- include\_tasks: patch\_containers.yml** _  
_ **^ here** _  
_ **"}** _

_ **2019-05-27 20:45:16,635 INFO: PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*** _  
_ **192.168.122.244 : ok=5 changed=3 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0** _

_ **2019-05-27 20:45:16,671 ERROR: Ansible playbook failed. See Ansible logs for details.** _  
_ **2019-05-27 20:45:16,671 ERROR: Unable to complete container prep on Undercloud** _  
_**Traceback (most recent call last):**_  
_ **File “/bin/opnfv-deploy”, line 10, in** _   
_**sys.exit(main())**_  
_ **File “/usr/lib/python3.4/site-packages/apex/deploy.py”, line 535, in main** _  
_**tmp\_dir=APEX\_TEMP\_DIR)**_  
_ **File “/usr/lib/python3.4/site-packages/apex/common/utils.py”, line 146, in run\_ansible** _  
_**raise Exception(e)**_  
_ **Exception: Ansible playbook failed. See Ansible logs for details.** _

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [May 28, 2019, 7:45pm UTC](https://forum.ansible.com/t/dict-object-has-no-attribute-json-ansible-error/30435/2 "2019-05-28T19:45:51Z")

</div>

Did you get those playbooks from  
[https://github.com/opnfv/apex/tree/master/lib/ansible/playbooks](https://github.com/opnfv/apex/tree/master/lib/ansible/playbooks) ?  
If so, just a link would have been sufficient, rather than copy pasting them as an unreadable piece of HTML email.

In any case, those playbooks are part of a much larger set of playbooks and code. They’re highly specific to the OPNFV project. I would suggest asking the people/authors over there first.

Dick

---

<div class="post-metadata">

**Author:** ![Deva\_Krishnan](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@Deva\_Krishnan](https://forum.ansible.com/u/Deva_Krishnan)\
**Post date:** [May 29, 2019, 8:59am UTC](https://forum.ansible.com/t/dict-object-has-no-attribute-json-ansible-error/30435/3 "2019-05-29T08:59:52Z")

</div>

Hi Dick Visser,

Thank you for your advice. I will try to sort this out. For more help I will contact opnfv community.

Thanks & Regards,  
Devakrishnan
