I've also been playing with the idea of doing the following:

- include: x.yml var={{item}}
  with_sequence: ...

Sadly, includes are no longer allowed to be used in conjunction with 
'with_items'.
Same goes on playbook level, invoking a role multiple times in a loop isn't 
allowed either.

Now I know that the best practice supposedly is to use loops within tasks, 
but for me that really doesn't work since this role consists of like 30 
tasks that would all require the same loop around them, to me it makes much 
more sense if I can define the loop before including the file instead of 
having to write the same loop 30 times.

Anyway, I'm still having the feeling that I should aim at a different 
approach; surely there must be other people who have servers with multiple 
instances of an application on it?

-- 
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/89e9a9e7-01c8-45df-9228-634626504d3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to