Seems like you *might* mean with_nested seeing you are looping over what
appears to be two different lists.

Or else "groups.storages" is something else.  That looks like the odd one
out to me.

Everything else looks fine, so when you say "doesn't seem to work", more
info would be helpful about how it was not working?

Thanks!


On Wed, Apr 16, 2014 at 4:42 AM, Sébastien Han <[email protected]>wrote:

> Up?
>
>
> On Monday, April 14, 2014 5:59:15 PM UTC+2, Sébastien Han wrote:
>>
>> Hello,
>>
>> I'm trying to loop over a set of host, get their IP and then append the
>> result to a file.
>>
>> Currently the action looks like this:
>>
>> - name: build rings
>>   command: swift-ring-builder {{ item.service }}.builder add z1-{{
>> hostvars[inventory_hostname]["ansible_bond1.2108"].ipv4.address }}:{{
>> item.port }}/sdb1 100
>>            chdir=/etc/swift
>>   with_items:
>>     - { service: 'account', port: '6002' }
>>     - { service: 'container', port: '6001' }
>>     - { service: 'object', port: '6000' }
>>     - groups.storages
>>
>> Basically I'd like to look over 'groups.storages' in {{
>> hostvars[inventory_hostname]["ansible_bond1.2108"].ipv4.address }.
>>
>> Is it doable?
>>
>> This looks like this https://coderwall.com/p/w5o6eq, althought it
>> doesn't seem to work with the new convention "{{ }}"
>>
>> Thanks in advance :).
>>
>> Cheers!
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/b1d69cd7-8326-4840-a7ae-6e66a528fde4%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/b1d69cd7-8326-4840-a7ae-6e66a528fde4%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgyChrGymubfmPr22Nb-kXMZGTrbKx8aKhpP3fwnjgxgNQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to