Sorry, replying from phone.

28 maj 2014 16:59 "'Petros Moisiadis' via Ansible Project" <
[email protected]> 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 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.

Maybe most easily, but definitely not impossible. Currently I can deploy
gitlab, gitlab-ci, phpmyadmin, phpipam, etherpad, owncloud, all on the same
server behind nginx. I don't see how including templates in nginx role from
other roles to make that possible could help me.

>
> > 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.

Why not deploy for example dnsmasq? I mean, using /etc/hosts for DNS in a
multiple host environment is so 1960...

>
> > I'm thinking that they wish they'd called them prerequisites not
dependencies now. :-)

Seconded. :)

Maciej

> >
> > 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/5385F9DB.9030903%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/CAEnKK1y7B3ecBT3KC%2B1pUQxKNv94krF2sQ1Ziboix3Rm5BnosA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to