Open
Description
Proposed feature
Allow the override of server.xml.j2 & setenv.sh.j2 template source in the instance.yml task file
Rationale
This would allow for template override if/when needed, to add or remove functionalities otherwise hardcoded in the template.
Additional context
I had to change the server.xml.j2
template to add new features like services, engines, hosts & aliases declaration but found myself stranded when I had to force the template task to use my own template (even using the same filename in my template folder)
Being able to set a template_src
variable per instance would solve this problem :
tomcat_instances:
- name: "{{ tomcat_name }}"
server_xml_template_src : server.xml.j2
setenv_template_src : setenv.sh.j2
[...]
- name: instance | Configure tomcat instance - server.xml
ansible.builtin.template:
src: {{ instance.server_xml_template_src |default('server.xml.j2') }}
dest: "{{ tomcat_directory }}/{{ instance.name }}/conf/server.xml"
mode: "0644"
notify:
- Restart tomcat instance
This would be the same for the setenv.sh.j2
template.
Thanks o/
Metadata
Metadata
Assignees
Labels
No labels