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.

Reply via email to