forked from ISTI-ansible-roles/ansible-roles
library/roles/geoserver/geoserver: Fix the download task. Add a task that makes the geoserver smartgears compatible.
This commit is contained in:
parent
7ec0742786
commit
bcd806dd94
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
- name: Install the gcube-app file to make geoserver smartgears compatible
|
||||
template: src=gcube-app.xml.j2 dest={{ item.instance_path }}/webapps/{{ geoserver_app_name }}/WEB-INF/gcube-app.xml owner={{ item.user }} group={{ item.user }}
|
||||
with_items: '{{ tomcat_m_instances }}'
|
||||
notify: tomcat instances restart
|
||||
when: geoserver_install
|
||||
tags: geoserver
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
---
|
||||
|
||||
- block:
|
||||
- name: Create the Geoserver download directory
|
||||
file: path={{ geoserver_download_directory }} state=directory
|
||||
|
||||
- name: Create the Geoserver webapp directory
|
||||
file: path={{ item.instance_path }}/webapps/{{ geoserver_app_name }} state=directory owner={{ item.user }} group={{ item.user }}
|
||||
with_items: '{{ tomcat_m_instances }}'
|
||||
|
||||
- name: Create the Geoserver data directory
|
||||
file: path={{ geoserver_data_directory }} state=directory owner={{ item.user }} group={{ item.user }}
|
||||
with_items: '{{ tomcat_m_instances }}'
|
||||
|
||||
- name: Download and unpack the Geoserver file distribution
|
||||
unarchive: copy=no src={{ geoserver_download_url }} dest={{ geoserver_download_directory }} creates={{ geoserver_download_directory }}/geoserver.war validate_certs=False
|
||||
|
||||
- name: Unpack the Geoserver war file
|
||||
unarchive: copy=no src={{ geoserver_download_directory }}/geoserver.war dest={{ item.instance_path }}/webapps/{{ geoserver_app_name }} creates={{ item.instance_path }}/webapps/{{ geoserver_app_name }}/WEB-INF/lib owner={{ item.user }} group={{ item.user }}
|
||||
with_items: '{{ tomcat_m_instances }}'
|
||||
notify: tomcat instances restart
|
||||
|
||||
when: geoserver_install
|
||||
tags: geoserver
|
||||
|
||||
- block:
|
||||
- name: Remove the Geoserver webapp directory
|
||||
file: path={{ item.instance_path }}/webapps/{{ geoserver_app_name }} state=absent
|
||||
with_items: '{{ tomcat_m_instances }}'
|
||||
notify: tomcat instances restart
|
||||
|
||||
- name: Remove the Geoserver download and data directories
|
||||
file: path={{ item }} state=absent
|
||||
with_items:
|
||||
- '{{ geoserver_download_directory }}'
|
||||
- '{{ geoserver_data_directory }}'
|
||||
|
||||
when: not geoserver_install
|
||||
tags: geoserver
|
||||
|
|
@ -1,39 +1,4 @@
|
|||
---
|
||||
- block:
|
||||
- name: Create the Geoserver download directory
|
||||
file: path={{ geoserver_download_directory }} state=directory
|
||||
|
||||
- name: Create the Geoserver webapp directory
|
||||
file: path={{ item.instance_path }}/webapps/{{ geoserver_app_name }} state=directory owner={{ item.user }} group={{ item.user }}
|
||||
with_items: '{{ tomcat_m_instances }}'
|
||||
|
||||
- name: Create the Geoserver data directory
|
||||
file: path={{ geoserver_data_directory }} state=directory owner={{ item.user }} group={{ item.user }}
|
||||
with_items: '{{ tomcat_m_instances }}'
|
||||
|
||||
- name: Download and unpack the Geoserver file distribution
|
||||
unarchive: copy=no src={{ geoserver_download_url }} dest={{ geoserver_download_directory }} creates={{ geoserver_download_directory }}/geoserver.war
|
||||
|
||||
- name: Unpack the Geoserver war file
|
||||
unarchive: copy=no src={{ geoserver_download_directory }}/geoserver.war dest={{ item.instance_path }}/webapps/{{ geoserver_app_name }} creates={{ item.instance_path }}/webapps/{{ geoserver_app_name }}/WEB-INF/lib owner={{ item.user }} group={{ item.user }}
|
||||
with_items: '{{ tomcat_m_instances }}'
|
||||
notify: tomcat instances restart
|
||||
|
||||
when: geoserver_install
|
||||
tags: geoserver
|
||||
|
||||
- block:
|
||||
- name: Remove the Geoserver webapp directory
|
||||
file: path={{ item.instance_path }}/webapps/{{ geoserver_app_name }} state=absent
|
||||
with_items: '{{ tomcat_m_instances }}'
|
||||
notify: tomcat instances restart
|
||||
|
||||
- name: Remove the Geoserver download and data directories
|
||||
file: path={{ item }} state=absent
|
||||
with_items:
|
||||
- '{{ geoserver_download_directory }}'
|
||||
- '{{ geoserver_data_directory }}'
|
||||
|
||||
when: not geoserver_install
|
||||
tags: geoserver
|
||||
|
||||
- include: geoserver.yml
|
||||
- include: geoserver-gcubeapp.yml
|
||||
when: smartgears_node is defined and smartgears_node
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<application mode="online">
|
||||
|
||||
<name>{{ smartgears_gcube_app_name }}</name>
|
||||
<group>{{ smartgears_gcube_app_group }}</group>
|
||||
<version>1.0</version>
|
||||
{% if smartgears_persistence_location is defined %}
|
||||
<persistence location="{{ smartgears_persistence_location }}"/>
|
||||
{% endif %}
|
||||
<exclude>*</exclude>
|
||||
|
||||
</application>
|
||||
|
Loading…
Reference in New Issue