i.e. if there are a set of servers that are FooAndBar - hosts: my_special_group_of_servers_that_do_foo_and_bar roles: - common - foo - bar
- hosts: my_special_group_of_servers_that_just_baz_and_glorp roles: - common - baz - glorp On Thu, Jan 30, 2014 at 6:03 PM, Michael DeHaan <mich...@ansibleworks.com>wrote: > The most fundamental problem is you shouldn't be doing playbooks by role, > you should be including playbooks by group. > > The playbook then applies the roles to the groups. > > That will remove the duplication question entirely. > > --Michael > > > On Thu, Jan 30, 2014 at 3:14 PM, Adam Heath <a...@brainfood.com> wrote: > >> Other than speed(because it takes longer to run duplicate roles), is this >> really a problem? A playbook result should always have a constant, final >> output, when it is done with all it's tasks. A duplicate role is simliar >> to just running a playbook multiple times, which shouldn't really cause any >> changes. >> >> >> On 01/30/2014 12:54 PM, Erik Anderson wrote: >> >>> In my site.yml, I have the following: >>> >>> - include: role1.yml >>> - include: role2.yml >>> - include: ... >>> >>> In each of the roleX.yml files, I have: >>> >>> - hosts: roleXservers >>> sudo: yes >>> roles: >>> - common >>> - roleX >>> >>> Now, in my inventory, if I have a server to which I've assigned multiple >>> roles, the "common" role is getting applied twice, once for each >>> roleX.yml file that applies to the server. >>> >>> Is there any way to "de-duplicate" roles before applying? Or perhaps a >>> different way I can structure things to avoid having my "common" role >>> applied multiple times? >>> >> >> -- >> 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 ansible-project+unsubscr...@googlegroups.com. >> To post to this group, send email to ansible-project@googlegroups.com. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > Michael DeHaan <mich...@ansible.com <mich...@ansibleworks.com>> > CTO, Ansible, Inc. > http://www.ansible.com/ <http://www.ansibleworks.com/> > > -- Michael DeHaan <mich...@ansible.com <mich...@ansibleworks.com>> CTO, Ansible, Inc. http://www.ansible.com/ <http://www.ansibleworks.com/> -- 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 ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.