diff --git a/smartgears/gcubeapp-setup/defaults/main.yml b/smartgears/gcubeapp-setup/defaults/main.yml new file mode 100644 index 00000000..845eeae0 --- /dev/null +++ b/smartgears/gcubeapp-setup/defaults/main.yml @@ -0,0 +1,6 @@ +--- +gcubeapp_setup: False + +#gcubeapp_webapps: +# - { webapp_name: '', version: '' } + diff --git a/smartgears/gcubeapp-setup/tasks/main.yml b/smartgears/gcubeapp-setup/tasks/main.yml new file mode 100644 index 00000000..d1c3a343 --- /dev/null +++ b/smartgears/gcubeapp-setup/tasks/main.yml @@ -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' ] + diff --git a/smartgears/gcubeapp-setup/templates/gcube-app.xml.j2 b/smartgears/gcubeapp-setup/templates/gcube-app.xml.j2 new file mode 100644 index 00000000..db684863 --- /dev/null +++ b/smartgears/gcubeapp-setup/templates/gcube-app.xml.j2 @@ -0,0 +1,12 @@ + + + {{ item.1.webapp_name }} + {{ item.1.webapp_group }} + {{ item.1.version }} +{% if item.1.persistence_location is defined %} + +{% endif %} + /* + + +