forked from ISTI-ansible-roles/ansible-roles
Merge branch 'master' of roberto.cirillo/ansible-playbooks into master
This commit is contained in:
commit
e8e922cba6
|
@ -1,14 +1,19 @@
|
|||
---
|
||||
- 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: Remove the catalina webapp configurations
|
||||
- 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
|
||||
with_items: '{{ catalina_apps_conf }}'
|
||||
when: ( not item.state | default(True) )
|
||||
when: ( not item.state | default(True) )
|
||||
|
||||
become: True
|
||||
become_user: '{{ smartgears_user }}'
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
Loading…
Reference in New Issue