Roles are intended to be independent things, so sharing files between them
doesn't make a lot of sense. One thing you could do, if these two roles are
that similar, is to combine them into a single role and add a variable to
defaults which set the mode, for instance "dbservers_mode: master". Then
you could have something like this in your tasks/main.yml:
- include: "{{dbservers_mode}}.yml"
And then the master.yml/slave.yml files would be the tasks/main.yml from
each of the individual roles.
Hope that helps!
James Cammarata
Director, Ansible Core Engineering
github: jimi-c
On Wed, Apr 8, 2015 at 2:47 AM, Ridho Adya Pangestu <[email protected]>
wrote:
> streaming.yml
>
> ---
> - hosts: dbservers-master
> sudo: yes
> roles:
> - configure-master
>
> - hosts: dbservers-master
> sudo: yes
> roles:
> - configure-slave
>
> --
> 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/2c850615-2ed5-4219-9265-832f0ee3c81b%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/2c850615-2ed5-4219-9265-832f0ee3c81b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
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/CAMFyvFiQgPPv%2Bf9Stx%2BivV4jpUR%2BuGwQ_zTi5dJn983ArfgRFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.