"But we could make role dependencies allow for template overrides / injections"
I find this kind of language hard to understand. ", I can see great potential if we make role dependencies smart enough to allow template inheritance between dependent roles. " I don't even know what this means. Ansible isn't a programing language, I would find this easier if we did not try to use the phrase "inheritance" where it didn't make sense. Did you mean including a template in another template? On Tue, May 27, 2014 at 1:58 PM, 'Petros Moisiadis' via Ansible Project < [email protected]> wrote: > On 05/27/14 20:26, Michael DeHaan wrote: > > Really, role deps shouldn't be looked at like inheritance though - > > they are simply NOT inheritance. They are things to do *first*. > > > > It might be better to pass a parameter into the role instead (like you > > have) with what filename to use, I'm unclear as to why you think it > > needs an absolute path though. > > > But we could make role dependencies allow for template overrides / > injections. Judging by discussions in several related topics, it seems > that this would be a feature that people would want to have, so I do not > understand why you are against some little level of inheritance for the > templates. In fact, I can see great potential if we make role > dependencies smart enough to allow template inheritance between > dependent roles. Jinja already has this power built-in. Why don't we > take advantage of it? Imagine an 'apache' role that provides a vhost > template with a "{% block extra %}{% endblock %}" jinja block and a > 'wsgi_app' role which depends on 'apache' role and provides content for > that 'extra' block. That would allow for a really modular design of > roles, instead of having to maintain huge, monolithic roles that do > everything with a lot of conditional includes and passing "strange" role > parameters. Role parameters are exactly what you want for things such as > 'http_port' or 'bind_address', but using them for practically choosing a > "more specific role for the role" is far from elegant design. > > -- > 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/5384D232.9000106%40yahoo.gr > . > 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/CA%2BnsWgwKB6HCf%2Bj_6P4X2h8ZYcgc6dyT45fj8%3DYvfH90bOM2kw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
