Erik, this is occurring because these roles are spanning multiple plays (which is what the "include: whatever.yml" syntax does) and we do not currently de-dupe roles across plays (only within plays). This question has come up in the past, such as this thread:
https://groups.google.com/forum/#!topic/ansible-project/nd4wMLsb0Jw There are some suggestions there on how to avoid multiple runs via the use of set_fact, which currently is the best way to avoid this. On Thu, Jan 30, 2014 at 12:54 PM, Erik Anderson <erike...@gmail.com> 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? > > -Erik > > -- > 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. > -- James Cammarata <jcammar...@ansibleworks.com> Sr. Software Engineer, AnsibleWorks, Inc. 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.