On Friday, April 25, 2014 12:01:16 AM UTC-7, Ernest0x wrote:
>
>  
> What you suggest could be useful only if you just want to override some 
> templates and/or files. But you may also want your 'extend' role to have 
> some new tasks of its own, so that they are run after the invocation of the 
> 'base' role. 
>

Which is where you use the "dependency" part for real.  Override the 
templates files using ramon's technique and then use Dependency to call 
that task BEFORE you call your own tasks.

I'm not sure that adding Inheritance features to Ansible playbooks would be 
worthwhile, there are ways around it already using different templates (or 
more complicated templates).  You can make it non-idempotent by using two 
tasks that modify the same file (say a template to put a base version in 
and lineinfile to modify it) but if you do that you probably want to look 
at what you are doing and see if there is a better way to get to where you 
want to be.  If you are making big changes to a role then you might want to 
consider creating your own role to do what you want instead.  

Adam

-- 
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/6c0524b7-3a11-4715-8b12-e18c215fa0c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to