I think Tomasz it correct, it was working. Changed it anyways so people
don't get confused.
One more question. I tried:
And I wanted to use a loop to create those services, but now I am doing
this:
- { role: some-services, service: "{{ services[0] }}", when: services[0]
is defined }
- { role: some-services, service: "{{ services[1] }}", when: services[1]
is defined }
or
- { role: some-services, service: "{{ services[0] }}", when: "{{
services[0] }}" is defined }
- { role: some-services, service: "{{ services[1] }}", when: "{{
services[0] }}" is defined }
But none of that is working, this however works:
- { role: some-services, service: "{{ services[1] }}", when: simple_var is
defined }
thanks
Peter
On Saturday, January 10, 2015 at 3:03:16 AM UTC-8, Tomasz Kontusz wrote:
>
> On 10.01.2015 01:38, Brian Coca wrote:
> > there is not currently a way to loop through roles, you can make the
> > role accept a list and have it's tasks loop over it though.
> >
> > also i would advice to not use a variable named 'service' as it can
> > conflict with the module of the same name.
> >
> >
> I'm pretty sure modules and actions live in a different name space than
> variables. Or do you mean visually?
>
--
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/7a43be9e-667c-42cc-9186-08c696d3ee9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.