Closed jnogol closed 6 years ago
Problem is that, using the role within a playbook, is not possible to override the role template. A workaround could be changing the template src
to a variable, so it can be changed in the playbook and therefore there is no need to add a new task.
- name: FLUENTD | Copy server config
template:
src: "{{ fluentd_config_template }}"
In the role's defaults/main.yml
:
fluentd_config_template: fluentd/fluent.conf
In the playbook:
fluentd_config_template: "{{ playbook_dir }}/templates/path/to/template"
What do you think, @jdvr @jmonterrubio @dortegau?
I think it's ok, the other alternatives are not better so, This would be a good implementation.
Description
In
tasks/config.yml
there is a task that copiesfluent.conf
from files. It would be interesting templating this file instead of copying, because we can then use this role to deploy fluentd to different hosts.