Re: [ansible-project] Template/File path for dependencies

2014-05-29 Thread Paul Oyston
Just to confirm, I wasn't suggesting any form of inheritance in any way, it's just that quite often when you want to include dependencies then you may want to pass a template to that particular role. In many circumstances (such as nginx) it's not possible to provide this via yaml configuration

Re: [ansible-project] Template/File path for dependencies

2014-05-29 Thread Paul Oyston
I'm not at all saying that the role HAS to know about the template path, I'm saying that during the passing of the parameters of that role you could pass in a string that represents a file and that file could either exist in the role that has the dependency declaration or the role that you're

Re: [ansible-project] Template/File path for dependencies

2014-05-28 Thread Michael DeHaan
That means when a role is being deployed because of a role dependency, its template tasks could use blocks possibly provided by any role that depends on it and is included in the active dependency chain. The problem is 95% of our users including myself have trouble with this wording :) We avoid

Re: [ansible-project] Template/File path for dependencies

2014-05-28 Thread 'Petros Moisiadis' via Ansible Project
On 05/28/14 15:04, Michael DeHaan wrote: That means when a role is being deployed because of a role dependency, its template tasks could use blocks possibly provided by any role that depends on it and is included in the active dependency chain. The problem is 95% of our users including

Re: [ansible-project] Template/File path for dependencies

2014-05-28 Thread 'Petros Moisiadis' via Ansible Project
On 05/28/14 15:13, James Cammarata wrote: Absolutely. Role dependencies are more like package dependencies - if package A depends on package B, it means you need to install package B first. In no circumstances should package B include files that package A is going to overwrite. It would

Re: [ansible-project] Template/File path for dependencies

2014-05-28 Thread Michael DeHaan
Ok so it's still not inheritance (this is an uneducated misuse of the term by Jinja, it's encapsulation, quite a different concept), ansible roles themselves are definitely not inheritance. (I've also written a lot in Django) Ultimately the problem is we have an irresolveable communication gap

Re: [ansible-project] Template/File path for dependencies

2014-05-28 Thread 'Petros Moisiadis' via Ansible Project
On 05/28/14 16:50, Adam Morris wrote: For the specific example given: apache role and wsgi role there may be a simple, elegant, solution. Apache can include other configuration files, I don't know if it can include directories. If so include a directory. If not use the assemble module to

Re: [ansible-project] Template/File path for dependencies

2014-05-28 Thread 'Petros Moisiadis' via Ansible Project
On 05/28/14 17:59, 'Petros Moisiadis' via Ansible Project wrote: On 05/28/14 16:50, Adam Morris wrote: For the specific example given: apache role and wsgi role there may be a simple, elegant, solution. Apache can include other configuration files, I don't know if it can include

Re: [ansible-project] Template/File path for dependencies

2014-05-28 Thread Maciej Delmanowski
Sorry, replying from phone. 28 maj 2014 16:59 'Petros Moisiadis' via Ansible Project ansible-project@googlegroups.com napisał(a): On 05/28/14 16:50, Adam Morris wrote: For the specific example given: apache role and wsgi role there may be a simple, elegant, solution. Apache can include

Re: [ansible-project] Template/File path for dependencies

2014-05-28 Thread 'Petros Moisiadis' via Ansible Project
On 05/28/14 18:17, Maciej Delmanowski wrote: Sorry, replying from phone. 28 maj 2014 16:59 'Petros Moisiadis' via Ansible Project ansible-project@googlegroups.com mailto:ansible-project@googlegroups.com napisał(a): On 05/28/14 16:50, Adam Morris wrote: For the specific example given:

Re: [ansible-project] Template/File path for dependencies

2014-05-28 Thread Maciej Delmanowski
2014-05-28 17:55 GMT+02:00 'Petros Moisiadis' via Ansible Project ansible-project@googlegroups.com: On 05/28/14 18:17, Maciej Delmanowski wrote: It is true that software that has support for include directories can help, but it become less helpful as you add more levels in ther hierarchy

Re: [ansible-project] Template/File path for dependencies

2014-05-28 Thread 'Petros Moisiadis' via Ansible Project
On 05/28/14 20:55, Maciej Delmanowski wrote: 2014-05-28 17:55 GMT+02:00 'Petros Moisiadis' via Ansible Project ansible-project@googlegroups.com mailto:ansible-project@googlegroups.com: On 05/28/14 18:17, Maciej Delmanowski wrote: It is true that software that has support for

Re: [ansible-project] Template/File path for dependencies

2014-05-28 Thread Maciej Delmanowski
2014-05-28 21:42 GMT+02:00 'Petros Moisiadis' via Ansible Project ansible-project@googlegroups.com: But it seems you do have some specialized functionality embedded in your nginx role. For example you do fastcgi stuff. By fastcgi stuff I mean things such as configuration sections, structures

Re: [ansible-project] Template/File path for dependencies

2014-05-28 Thread ramon
Hi All, The inheritance discussion keeps popping up, appearantly there's value in there somewhere.. I'd like to add my 2ct, but just with regards to using galaxy roles. First: it's obviously not inheritance, I'd like to say override (like variables override eachother according to precedence),

Re: [ansible-project] Template/File path for dependencies

2014-05-28 Thread Adam Morris
On Wednesday, May 28, 2014 12:42:52 PM UTC-7, Ernest0x wrote: dependency. I am not sure if that can be done (easily and cleanly) with an ngix type of include mechanism. Also, keep in mind that there are systems that they do NOT provide such an include mechanism at all. And yet it

Re: [ansible-project] Template/File path for dependencies

2014-05-27 Thread Michael DeHaan
I don't understand what you are suggesting to implement, though this is probably a good discussion for ansible-devel instead of the main list. We would like to see what syntax you are proposing though it *sounds* like you might be saying to search the various role dependency chain items to find

Re: [ansible-project] Template/File path for dependencies

2014-05-27 Thread 'Petros Moisiadis' via Ansible Project
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

Re: [ansible-project] Template/File path for dependencies

2014-05-27 Thread Michael DeHaan
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.