thanks for getting back to me.

Here is what i intended:

I have a list of docker services:
services:
  - servicename: zapp
    containername: zapp
    port: 5555
    protocol: tcp
    exposed: false
    image: zapp
  - servicename: xox
    containername: xox
    port: 4444
    protocol: udp
    exposed: true
    linkto: zapp
    image: xox
  

And I wanted to use a loop to create those services, but now I am  doing 
this:
    - { role: some-services, service: "{{ services[0] }}" }
    - { role: some-services, service: "{{ services[1] }}" }

And I wanted to do this as a loop. But maybe I am completely off. Any ideas?

Note one of the reasons I am doing this is because ansible does not support 
docker restarts at the moment (it will with 1.9) 

thanks

Peter





On Friday, January 9, 2015 at 12:32:11 AM UTC-8, Tomasz Kontusz wrote:
>
> The solution you've shown is the only one at the moment.
>
> Peter Mooshammer <[email protected] <javascript:>> napisał:
>>
>> Hello,
>>
>> So include and with_items is depricated and I am wondering how to 
>> implement the following:
>>
>> I have to create a couple of similar services:
>> (I know this is not working)
>> - name: loopy
>>   shell: download something
>>   template: src: dest:
>>   service: name={{ service }} state=started  
>>   with_items: listing
>>
>>
>> Is the only way to do this?
>>
>> - name: download everything
>>   shell: download something
>>   with_items: listing
>> - name: copy templates
>>   template: src: dest:
>>   with_items: listing
>> - name: download everything
>>   service: name={{ service }} state=started
>>   with_items: listing
>>
>> What would be a better approach?
>>
>> thanks
>>
>> Peter
>>
>>
> -- 
> Wysłane za pomocą K-9 Mail.
>

-- 
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/eaf1a7d4-34db-45bf-8721-a3bec7786be1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to