# fatal error with role in some cases

**URL:** <https://forum.ansible.com/t/fatal-error-with-role-in-some-cases/19322>\
**Category:** Ansible Project\
**Created:** [September 22, 2015, 12:19am UTC](https://forum.ansible.com/t/fatal-error-with-role-in-some-cases/19322 "2015-09-22T00:19:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhidalgo](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/32.png) [@jhidalgo](https://forum.ansible.com/u/jhidalgo)\
**Post date:** [September 22, 2015, 12:19am UTC](https://forum.ansible.com/t/fatal-error-with-role-in-some-cases/19322/1 "2015-09-22T00:19:15Z")

</div>

I am having a very odd problem with some servers.

I have a common role (roles/common/task/main.yml) with this task:

- name: Snmp configuration

template:

src=snmpd.conf.j2

dest=/etc/snmp/snmpd.conf

owner=root

group=root

mode=0600

Before that task I have yum tasks that work as expected. On some servers that task fails showing:

TASK: [common | Snmp configuration] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

fatal: [server] =\> Traceback (most recent call last):

File “/usr/local/Cellar/ansible/1.9.3/libexec/lib/python2.7/site-packages/ansible/runner/ **init**.py”, line 586, in \_executor

exec\_rc = self.\_executor\_internal(host, new\_stdin)

File “/usr/local/Cellar/ansible/1.9.3/libexec/lib/python2.7/site-packages/ansible/runner/ **init**.py”, line 789, in \_executor\_internal

return self.\_executor\_internal\_inner(host, self.module\_name, self.module\_args, inject, port, complex\_args=complex\_args)

File “/usr/local/Cellar/ansible/1.9.3/libexec/lib/python2.7/site-packages/ansible/runner/ **init**.py”, line 1036, in \_executor\_internal\_inner

result = handler.run(conn, tmp, module\_name, module\_args, inject, complex\_args)

File “/usr/local/Cellar/ansible/1.9.3/libexec/lib/python2.7/site-packages/ansible/runner/action\_plugins/template.py”, line 114, in run

remote\_checksum = self.get\_checksum(conn, tmp, dest, inject, not directory\_prepended, source=source)

File “/usr/local/Cellar/ansible/1.9.3/libexec/lib/python2.7/site-packages/ansible/runner/action\_plugins/template.py”, line 34, in get\_checksum

remote\_checksum = self.runner.\_remote\_checksum(conn, tmp, dest, inject)

File “/usr/local/Cellar/ansible/1.9.3/libexec/lib/python2.7/site-packages/ansible/runner/ **init**.py”, line 1250, in \_remote\_checksum

python\_interp = inject[‘hostvars’][host].get(‘ansible\_python\_interpreter’, ‘python’)

File “/usr/local/Cellar/ansible/1.9.3/libexec/lib/python2.7/site-packages/ansible/runner/ **init**.py”, line 105, in **getitem**

result.update(self.vars\_cache.get(host, {}))

ValueError: dictionary update sequence element #0 has length 1; 2 is required

FATAL: all hosts have already failed – aborting

This happens as I said not in all cases, and I haven’t been able to identify nothing particularly different, so I could use some help.

Is this a bug in 1.9.3 ?

Thanks

---

<div class="post-metadata">

**Author:** ![jhidalgo](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/32.png) [@jhidalgo](https://forum.ansible.com/u/jhidalgo)\
**Post date:** [September 22, 2015, 12:31am UTC](https://forum.ansible.com/t/fatal-error-with-role-in-some-cases/19322/2 "2015-09-22T00:31:27Z")

</div>

Could this be related to:  
[https://github.com/ansible/ansible/issues/12248](https://github.com/ansible/ansible/issues/12248)

?
