# AnsibleUndefinedVariable: 'dict object' has no attribute u'ansible\_eth1

**URL:** <https://forum.ansible.com/t/ansibleundefinedvariable-dict-object-has-no-attribute-uansible-eth1/27360>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [April 24, 2018, 1:20pm UTC](https://forum.ansible.com/t/ansibleundefinedvariable-dict-object-has-no-attribute-uansible-eth1/27360 "2018-04-24T13:20:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alisson\_Medeiros](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@Alisson\_Medeiros](https://forum.ansible.com/u/Alisson_Medeiros)\
**Post date:** [April 24, 2018, 1:20pm UTC](https://forum.ansible.com/t/ansibleundefinedvariable-dict-object-has-no-attribute-uansible-eth1/27360/1 "2018-04-24T13:20:21Z")

</div>

**System:**  
`

Vagrant with ubuntu xenial 64 box  
`

**Task:**

`  
TASK [memcached : Copying over config.json files for services]

`

**/usr/local/share/kolla-ansible/ansible/roles/memcached/tasks/config.yml**

`

- name: Ensuring config directories exist  
file:  
path: “{{ node\_config\_directory }}/{{ item }}”  
state: “directory”  
recurse: yes  
with\_items:

- “memcached”

- name: Copying over config.json files for services  
template:  
src: “{{ item }}.json.j2”  
dest: “{{ node\_config\_directory }}/{{ item }}/config.json”  
register: memcached\_config\_json  
with\_items:

- “memcached”  
notify: Restart memcached container

- name: Check memcached container  
vars:  
service: “{{ memcached\_services.memcached }}”  
kolla\_docker:  
action: “compare\_container”  
common\_options: “{{ docker\_common\_options }}”  
name: “{{ service.container\_name }}”  
image: “{{ service.image }}”  
volumes: “{{ service.volumes }}”  
register: check\_memcached\_container  
when:

- inventory\_hostname in groups[service.group]

- service.enabled | bool

- action != “config”  
notify: Restart memcached container  
`

**Ful error:**

` TASK [memcached : Copying over config.json files for services] ***************** task path: /usr/local/share/kolla-ansible/ansible/roles/memcached/tasks/config.yml:10 <localhost> ESTABLISH LOCAL CONNECTION FOR USER: root <localhost> EXEC /bin/sh -c 'echo ~ && sleep 0' <localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/vagrant/.ansible/tmp/ansible-tmp-1524554119.15-234223887769910 `" && echo ansible-tmp-1524554119.15-234223887769910="` echo /home/vagrant/.ansible/tmp/ansible-tmp-1524554119.15-234223887769910 `" ) && sleep 0’  
 EXEC /bin/sh -c ‘rm -f -r /home/vagrant/.ansible/tmp/ansible-tmp-1524554119.15-234223887769910/ \> /dev/null 2\>&1 && sleep 0’  
failed: [localhost] (item=memcached) =\> {  
“changed”: false,  
“item”: “memcached”,  
“msg”: “AnsibleUndefinedVariable: ‘dict object’ has no attribute u’ansible\_eth1’”  
}  
to retry, use: --limit @/usr/local/share/kolla-ansible/ansible/site.retry

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
localhost : ok=4 changed=0 unreachable=0 failed=1

Command failed ansible-playbook -i /usr/local/share/kolla-ansible/ansible/inventory/all-in-one -e @/etc/kolla/globals.yml -e @/etc/kolla/passwords.yml -e CONFIG\_DIR=/etc/kolla -e action=deploy /usr/local/share/kolla-ansible/ansible/site.yml --verbose --verbose --verbose --verbose

`

**Playbook /usr/local/share/kolla-ansible/ansible/inventory/all-in-one**

`

# These initial groups are the only groups required to be modified. The

# additional groups are for more control of the environment.

[control]  
localhost ansible\_connection=local

[network]  
localhost ansible\_connection=local

[compute]  
localhost ansible\_connection=local

[storage]  
localhost ansible\_connection=local

[monitoring]  
localhost ansible\_connection=local

[deployment]  
localhost ansible\_connection=local

# You can explicitly specify which hosts run each project by updating the

# groups in the sections below. Common services are grouped together.

[chrony-server:children]  
haproxy

[chrony:children]  
network  
compute  
storage  
monitoring

[collectd:children]  
compute

[baremetal:children]  
control

[grafana:children]  
monitoring

[etcd:children]  
control  
compute

[karbor:children]  
control

[kibana:children]  
control

[telegraf:children]  
compute  
control  
monitoring  
network  
storage

[elasticsearch:children]  
control

[haproxy:children]  
network

[hyperv]  
#hyperv\_host

[hyperv:vars]  
#ansible\_user=user  
#ansible\_password=password  
#ansible\_port=5986  
#ansible\_connection=winrm  
#ansible\_winrm\_server\_cert\_validation=ignore

[mariadb:children]  
control

[rabbitmq:children]  
control

[outward-rabbitmq:children]  
control

[qdrouterd:children]  
control

[mongodb:children]  
control

[keystone:children]  
control

[glance:children]  
control

[nova:children]  
control

[neutron:children]  
network

[openvswitch:children]  
network  
compute  
manila-share

[opendaylight:children]  
network

[cinder:children]  
control

[cloudkitty:children]  
control

[freezer:children]  
control

[memcached:children]  
control

[horizon:children]  
control

[swift:children]  
control

[barbican:children]  
control

[heat:children]  
control

[murano:children]  
control

[ceph:children]  
control

[ironic:children]  
control

[influxdb:children]  
monitoring

[magnum:children]  
control

[sahara:children]  
control

[solum:children]  
control

[mistral:children]  
control

[manila:children]  
control

[panko:children]  
control

[gnocchi:children]  
control

[ceilometer:children]  
control

[aodh:children]  
control

[congress:children]  
control

[tacker:children]  
control

# Tempest

[tempest:children]  
control

[senlin:children]  
control

[vmtp:children]  
control

[trove:children]  
control

[watcher:children]  
control

[rally:children]  
control

[searchlight:children]  
control

[octavia:children]  
control

[designate:children]  
control

[placement:children]  
control

[bifrost:children]  
deployment

[zun:children]  
control

[skydive:children]  
monitoring

[redis:children]  
control

# Additional control implemented here. These groups allow you to control which

# services run on which hosts at a per-service level.

---

<div class="post-metadata">

**Author:** ![Hai\_Thanh\_Tran\_Nguye](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@Hai\_Thanh\_Tran\_Nguye](https://forum.ansible.com/u/Hai_Thanh_Tran_Nguye)\
**Post date:** [April 24, 2018, 3:43pm UTC](https://forum.ansible.com/t/ansibleundefinedvariable-dict-object-has-no-attribute-uansible-eth1/27360/2 "2018-04-24T15:43:28Z")

</div>

what is your template looks like ? you don’t have ansible\_eth1
