That is good to know. Thanks for the tip. I have beet trying it out and found that there are some of our roles that have to use templates in other roles which is proving a challenge.
Because of course the other role does not know if it is dealing with a two tiered "role" or a vanilla role, so this does have to be set explicitly. Why am I using something like this? We have a role that handles nginx configuration for a dispatching frontend. It makes sense to keep the nginx template in the role for the particular machine and keep the dispatcher configuration role generic, so it only needs to know that it takes a template and pops it onto the dispatching machine. It is given the name of the role, and some other parameters and needs to know nothing more about what it is doing, and therefore can be used by lots of other roles. Anyway that gives an idea of why we want to keep the specifics in the machine role and keep the other role generic. A bit of tweaking and this will be fixed. Thanks again for the advice. Rohan On Wednesday, 7 May 2014 14:44:21 UTC+2, Serge van Ginderachter wrote: > > > On 7 May 2014 13:08, Rohan Nicholls <[email protected] <javascript:>>wrote: > >> - Just calling a silo role by name would no longer work, and specific >> paths would have to be given, so a bunch of the nice out of the box >> convention over configuration would break. > > > With this structure, your role name really is e.g. "silo/create", which > I use myself often, I don't see any downsides to that. > > Also, if update and create are very similar, only differing by a couple of > tasks, you could consider using conditionals on a role parameter, e.g. > when: function == update? > > > Serge > > -- 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/bbc6e76b-289d-436d-bd63-487a21768b0f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
