Merge branch 'master' of roberto.cirillo/ansible-playbooks into master

This commit is contained in:
Roberto Cirillo 2019-05-03 17:01:33 +02:00 committed by Gitea
commit e8e922cba6
3 changed files with 34 additions and 5 deletions

View File

@ -1,9 +1,14 @@
---
- block:
- name: Install the catalina webapp configurations
- name: Install the catalina webapp configurations with distro <=16
template: src=catalina-app-conf.xml.j2 dest={{ smartgears_instance_path }}/conf/Catalina/localhost/{{ item.app_name }}.xml
with_items: '{{ catalina_apps_conf }}'
when: ( item.state | default(True) )
when: ( item.state | default(True) ) and ansible_distribution_major_version <= '16'
- name: Install the catalina webapp configurations with distro == 18
template: src=catalina-app-conf_tomcat8.xml.j2 dest={{ smartgears_instance_path }}/conf/Catalina/localhost/{{ item.app_name }}.xml
with_items: '{{ catalina_apps_conf }}'
when: ( item.state | default(True) ) and ansible_distribution_major_version == '18'
- name: Remove the catalina webapp configurations
file: dest={{ smartgears_instance_path }}/conf/Catalina/localhost/{{ item.app_name }}.xml state=absent

View File

@ -2,6 +2,11 @@
<Context reloadable="true">
<Loader className="org.apache.catalina.loader.VirtualWebappLoader"
{% if item.plugin_name is defined %}
virtualClasspath="{{ smartgears_instance_path }}/webapps/{{ item.app_name }}/WEB-INF/lib/plugins/{{ item.plugin_name }}/*.jar"/>
{% else %}
{% for plugin in item.app_plugins %}
virtualClasspath="{{ smartgears_instance_path }}/webapps/{{ item.app_name }}/WEB-INF/lib/plugins/{{ plugin }}/*.jar"/>
{% endfor %}
{% endif %}
</Context>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Resources className="org.apache.catalina.webresources.StandardRoot">
{% if item.plugin_name is defined %}
<PreResources className="org.apache.catalina.webresources.DirResourceSet"
base="{{ smartgears_instance_path }}/webapps/{{ item.app_name }}/WEB-INF/lib/plugins/{{ item.plugin_name }}/"
internalPath="/"
webAppMount="/WEB-INF/lib" />
{% else %}
{% for plugin in item.app_plugins %}
<PreResources className="org.apache.catalina.webresources.DirResourceSet"
base="{{ smartgears_instance_path }}/webapps/{{ item.app_name }}/WEB-INF/lib/plugins/{{ plugin }}/"
internalPath="/"
webAppMount="/WEB-INF/lib" />
{% endfor %}
{% endif %}
</Resources>
</Context>