Hi guys,
I had a bit of an idea surrounding the template and file path for
dependencies, wondering what everyone thinks of this.
At the moment when you use meta/main.yml - dependencies the template path
and file path is set to the role that you're running in. For example if you
were to use a example.nginx role the template path would be something like
/etc/ansible/roles/example.nginx/templates.
When you're calling dependencies it's likely that you may want to override
a template or pass a template in to the role. For example you may wish to
do something like:
# file: /etc/ansible/roles/example.app/meta/main.yml
---
dependencies:
- role: example.nginx
server_template: server.conf.j2
Where the server.conf.j2 file is contained within the example.app role. At
the moment the only workaround to this is to use the absolute path which
may not be very portable.
# file: /etc/ansible/roles/example.app/meta/main.yml
---
dependencies:
- role: example.nginx
server_template: /etc/ansible/roles/example.app/templates/server.conf.j2
I don't mind implementing this feature myself if it's considered to be a
good idea.
--
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/f4f5ca9c-fc82-4d55-a471-2f3cdee70f03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.