library/roles/smartgears/gcubeapp-setup: Generic role to install and customize gcube-app.xml inside non smartgears applications.

This commit is contained in:
Andrea Dell'Amico 2017-03-23 17:34:08 +01:00
parent a129368684
commit 23a75f861a
3 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,6 @@
---
gcubeapp_setup: False
#gcubeapp_webapps:
# - { webapp_name: '', version: '' }

View File

@ -0,0 +1,10 @@
---
- 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 }}
with_together:
- '{{ tomcat_m_instances }}'
- '{{ gcubeapp_webapps | default (omit) }}'
notify: tomcat instances restart
when: gcubeapp_setup
tags: [ 'smartgears', 'gcubeapp' ]

View File

@ -0,0 +1,12 @@
<application mode="online">
<name>{{ item.1.webapp_name }}</name>
<group>{{ item.1.webapp_group }}</group>
<version>{{ item.1.version }}</version>
{% if item.1.persistence_location is defined %}
<persistence location="{{ item.1.persistence_location }}"/>
{% endif %}
<exclude>/*</exclude>
</application>