Have a look at http://www.ansibleworks.com/docs/playbooks_roles.html#role-dependencies
There's a meta variable to allow for duplicates, but AFAIK, that only works within one role dependency tree, while your case has two (B and C). Maybe you can make that work with a role D which depends on B and C, not sure. On 11 December 2013 06:20, Xu Chen <[email protected]> wrote: > I have defined three roles: A, B and C. > > Using meta/main.yml, I have B depending on A, and C depending on A as > well. > > If I have the following: > > - hosts: group_test > roles: > - B > - C > > What happens is that the tasks associated to role A is executed twice. Is > there any dedup mechanism to execute them only once? > > Thanks.. > > -- > 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]. > For more options, visit https://groups.google.com/groups/opt_out. > -- 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]. For more options, visit https://groups.google.com/groups/opt_out.
