# porting this with\_together loop from ansible 1.9.4 -\> 2.0.1.0

**URL:** <https://forum.ansible.com/t/porting-this-with-together-loop-from-ansible-1-9-4-2-0-1-0/20782>\
**Category:** Ansible Project\
**Created:** [March 5, 2016, 10:38am UTC](https://forum.ansible.com/t/porting-this-with-together-loop-from-ansible-1-9-4-2-0-1-0/20782 "2016-03-05T10:38:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nusenu1](https://avatars.discourse-cdn.com/v4/letter/n/db5fbb/32.png) [@Nusenu1](https://forum.ansible.com/u/Nusenu1)\
**Post date:** [March 5, 2016, 10:38am UTC](https://forum.ansible.com/t/porting-this-with-together-loop-from-ansible-1-9-4-2-0-1-0/20782/1 "2016-03-05T10:38:58Z")

</div>

Hi,

after upgrading from ansible 1.9.4 to 2.0.1.0  
the task[1] shown below fails with the following message:

FAILED! =\> {"failed": true, "msg": "an unexpected type error occurred.  
Error was 'bool' object has no attribute '\_\_getitem\_\_'"}

- name: setup IP list (1/2)  
&nbsp;&nbsp;set\_fact:  
&nbsp;&nbsp;&nbsp;&nbsp;ips:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ipv4: "{{ item.0 }}"  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ipv6: "{{ item.1 }}"  
&nbsp;&nbsp;with\_together:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- "{{ tor\_v4ips }}"  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- "{{ tor\_v6ips }}"  
&nbsp;&nbsp;register: ipsinterm

tor\_v4/6ips are basically:  
ansible\_all\_ipv4/6\_addresses facts

Expected behavior:  
The loop should not fail even if the host has no IPv6 IPs  
(it used to work fine with v1.9.4)

Is this a bug/regression or an expected behavior change?

[1]  
[https://github.com/nusenu/ansible-relayor/blob/61a4057895a1c98e8b895e75bc1df30033af502a/tasks/ip-list.yml#L3](https://github.com/nusenu/ansible-relayor/blob/61a4057895a1c98e8b895e75bc1df30033af502a/tasks/ip-list.yml#L3)
