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 directories.  If so include a directory. If not 
>> use the assemble module to create your included file.
>>
>> Then the wsgi role just needs to drop a fragment or a complete file.
>>
>> Template encapsulation seems like it could get complicated fast. 
>> Particularly if you have dependency chains... how far back should it go?
> 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
>
> For example, consider a tree like this:
>
>                                        'apache' role
>                                              |
>                    +-------------------------+-------------------------+
>                    |                         |                        
> |     
>              'wsgi_app' role           'php_app' role           
> 'passenger_app'
>                    |                                                   |
>         +-----------------------+                          
> +------------------------+
>         |                       |                           |     
>                   |
> 'django_app' role       'flask_app' role            'redmine_app'
> role       'gitlab_app' role
>
>
> Deploying all or a subset of the above roles on the same server could be
> most easily done if my proposal for template encapsulation was available.
>
>> So is there another use case that we can discuss.
> I have a 'common' role that deploys /etc/hosts. In 'cluster node' role
> luster nodes I also add lines for all nodes in the cluster. Now I am
> using a really ugly loop around lineinfile for this that took me some
> time before I made it place the content properly. Try to use lineinfile
> with a relatively complex data structure and you will remember my words.
> Instead, it would be far more easy to write an "extra_hosts" block and
> do things in pure jinja.
>
>> I'm thinking that they wish they'd called them prerequisites not 
>> dependencies now. :-)
>>
>> Adam
>>

Oops, the line-wrapping algorithm destroyed my tree:
http://pastebin.com/SH5nTFEk

-- 
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/5385FB00.1020807%40yahoo.gr.
For more options, visit https://groups.google.com/d/optout.

Reply via email to