I've a setup of multiple projects, where each project specified the roles 
it works with via a playbook like the following:

# Ansible playbook.
# Has to be included in a top level playbook and the hosts variable set.
---
- hosts: "{{ hosts }}"
  roles:
    - { role: somerole }
Code hier eingeben...

Now I include this in the main playbook like the following:

  include: "{{ playbook }} hosts=some-hosts"

Now, there is the problem that in 1.7.1 this stopped working due to the 
variable in the include, which I already mentioned over at 
https://groups.google.com/forum/#!searchin/ansible-project/playbook$20include/ansible-project/Fd8HJ2bgTeE/QZM9QwBqEEMJ.

Besides that, the solution isn't optimal as afterwards I've to run some 
more roles on the same hosts, but if the dependencies of both roles overlap 
the dependencies get now executed twice. Instead, I'd love to be able to 
merge both playbooks into one or have a way to include some additional 
roles in one main play - that way the dependencies would be properly 
handled.

I'd tried something like following:

# Ansible playbook.
---
- hosts: my-hosts
  vars_files:
    - "{{ vars-with-roles-specified }}"
  roles: defined_roles +
    - { role: another_role }
Code hier eingeben...

However it seems that roles cannot be specified using variables at all. Any 
suggestions on how to achieve that best?

-- 
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/8e55db1f-acba-40d2-b0a8-618e57d41ff2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to