forked from ISTI-ansible-roles/ansible-roles
library/roles/geoserver: First tasks for the installation of a Geoserver, and its spatialite extension.
This commit is contained in:
parent
14720d656d
commit
430fe78896
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
geoserver_install: False
|
||||
geoserver_major_version: '2.10'
|
||||
geoserver_minor_version: 0
|
||||
geoserver_app_name: geoserver
|
||||
geoserver_version: '{{ geoserver_major_version }}.{{ geoserver_minor_version }}'
|
||||
geoserver_download_url: 'http://sourceforge.net/projects/geoserver/files/GeoServer/{{ geoserver_version }}/geoserver-{{ geoserver_version }}-war.zip'
|
||||
|
||||
geoserver_download_directory: /srv/geoserver
|
||||
geoserver_data_directory: /srv/geoserver_data
|
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
- 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
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
geoserver_spatial_install: False
|
||||
geoserver_spatial_url: 'http://ares.boundlessgeo.com/geoserver/{{ geoserver_major_version }}.x/community-latest/geoserver-{{ geoserver_major_version }}-SNAPSHOT-spatialite-plugin.zip'
|
||||
|
||||
geoserver_spatial_dpkg_requirements:
|
||||
- libgeos-c1
|
||||
- libproj0
|
||||
- proj-bin
|
||||
|
||||
geoserver_spatial_db_dir: /srv/geoserver_spatialite/data
|
Loading…
Reference in New Issue