From e8a566e35dbaaf5d2bc3d73e1d5512a6e41a015e Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 9 Feb 2018 09:52:46 +0100 Subject: [PATCH] geoserver: minor changes. The upgrade path is broken, the 'unarchive' task must be changed in future so that it does a get_url and then a local unarchive. --- geoserver/geoserver/tasks/geoserver.yml | 9 ++++++++- geoserver/geoserver/tasks/main.yml | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/geoserver/geoserver/tasks/geoserver.yml b/geoserver/geoserver/tasks/geoserver.yml index 295d3261..0b3ff53c 100644 --- a/geoserver/geoserver/tasks/geoserver.yml +++ b/geoserver/geoserver/tasks/geoserver.yml @@ -17,9 +17,16 @@ with_items: '{{ tomcat_m_instances }}' - name: Download the Geoserver file distribution - unarchive: copy=no src={{ geoserver_download_url }} dest={{ geoserver_download_directory }} creates={{ geoserver_download_directory }}/geoserver.war validate_certs=False + unarchive: copy=no src={{ geoserver_download_url }} dest={{ geoserver_download_directory }} creates={{ geoserver_download_directory }}/geoserver-{{ geoserver_version }}.war validate_certs=False + register: geoserver_download + + - name: Remove the old geoserver instance if there's any + file: dest=dest={{ item.instance_path }}/webapps/{{ geoserver_app_name | lower }} state=absent + with_items: '{{ tomcat_m_instances }}' + when: ( geoserver_download | changed ) - name: Unpack the Geoserver war file + #unarchive: copy=no src={{ geoserver_download_directory }}/geoserver-{{ geoserver_version }}.war dest={{ item.instance_path }}/webapps/{{ geoserver_app_name | lower }} creates={{ item.instance_path }}/webapps/{{ geoserver_app_name | lower }}/WEB-INF/lib owner={{ item.user }} group={{ item.user }} unarchive: copy=no src={{ geoserver_download_directory }}/geoserver.war dest={{ item.instance_path }}/webapps/{{ geoserver_app_name | lower }} creates={{ item.instance_path }}/webapps/{{ geoserver_app_name | lower }}/WEB-INF/lib owner={{ item.user }} group={{ item.user }} with_items: '{{ tomcat_m_instances }}' notify: tomcat instances restart diff --git a/geoserver/geoserver/tasks/main.yml b/geoserver/geoserver/tasks/main.yml index 7fe126b0..ad9a0b0b 100644 --- a/geoserver/geoserver/tasks/main.yml +++ b/geoserver/geoserver/tasks/main.yml @@ -1,2 +1,2 @@ --- -- include: geoserver.yml +- import_tasks: geoserver.yml