forked from ISTI-ansible-roles/ansible-roles
library/roles/smartgears/gcubeapp-setup: Fix the case where multiple apps are involved.
This commit is contained in:
parent
baf4e046ce
commit
bf9eaa3309
|
@ -2,6 +2,6 @@
|
||||||
gcubeapp_setup: False
|
gcubeapp_setup: False
|
||||||
|
|
||||||
#gcubeapp_webapps:
|
#gcubeapp_webapps:
|
||||||
# - { webapp_name: '', version: '', webapp_group: '', description: '', exclude_handlers: [ '' ] }
|
# - { webapp_path: '', webapp_name: '', version: '', webapp_group: '', description: '', exclude_handlers: [ '' ] }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
---
|
---
|
||||||
- name: Install the gcube-app file to make the webapp smartgears compatible
|
- name: Install the gcube-app file to make the webapp smartgears compatible
|
||||||
template: src=gcube-app.xml.j2 dest={{ item.0.instance_path }}/webapps/{{ item.1.webapp_name }}/WEB-INF/gcube-app.xml owner={{ item.0.user }} group={{ item.0.user }}
|
template: src=gcube-app.xml.j2 dest={{ item.webapp_path | default('/home/gcube/tomcat') }}/webapps/{{ item.webapp_name }}/WEB-INF/gcube-app.xml owner={{ smartgears_user }} group={{ smartgears_user }}
|
||||||
with_together:
|
with_items: '{{ gcubeapp_webapps | default (omit) }}'
|
||||||
- '{{ tomcat_m_instances }}'
|
notify: Restart smartgears
|
||||||
- '{{ gcubeapp_webapps | default (omit) }}'
|
|
||||||
notify: tomcat instances restart
|
|
||||||
when: gcubeapp_setup
|
when: gcubeapp_setup
|
||||||
tags: [ 'smartgears', 'gcubeapp' ]
|
tags: [ 'smartgears', 'gcubeapp' ]
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
<application mode="online">
|
<application mode="online">
|
||||||
|
|
||||||
<name>{{ item.1.webapp_name }}</name>
|
<name>{{ item.webapp_name }}</name>
|
||||||
<group>{{ item.1.webapp_group }}</group>
|
<group>{{ item.webapp_group }}</group>
|
||||||
<version>{{ item.1.version }}</version>
|
<version>{{ item.version }}</version>
|
||||||
{% if item.1.description is defined %}
|
{% if item.description is defined %}
|
||||||
<description> "{{ item.1.description }}" </description>
|
<description> "{{ item.description }}" </description>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if item.1.persistence_location is defined %}
|
{% if item.persistence_location is defined %}
|
||||||
<persistence location="{{ item.1.persistence_location }}"/>
|
<persistence location="{{ item.persistence_location }}"/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if item.1.exclude_handlers is defined %}
|
{% if item.exclude_handlers is defined %}
|
||||||
{% for eh in item.1.exclude_handlers %}
|
{% for eh in item.exclude_handlers %}
|
||||||
<exclude {{ eh }}</exclude>
|
<exclude {{ eh }}</exclude>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue