I am deploying multiple web applications that all have 4 tasks in common:
- name: copy nginx conf
template:
src=nginx.conf
dest=/etc/nginx/{{ inventory_hostname }}.conf
- enable nginx conf
file:
state=link
...
- name: copy certs
....
- name: copy chain
...
To avoid this redundancy, I tried to define a meta role: `nginx` with the
tasks above and set this role as dependency in every webapp role
# webapp1-role meta/main.yml
dependencies: {name: nginx, tags: [nginx]}
Unfortunately the nginx role does not search in `templates` folder of the
`webapp1-role`
Does the `nginx` role somehow know about the role it is called with?
Or how would I prevent this redundancy?
--
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/850e313f-2952-4922-b7ac-45f2f4efc729%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.