From 380f0f33109236003c90aa20db1337efebe6845d Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 3 Aug 2018 18:57:23 +0200 Subject: [PATCH] library/roles/geonetwork/geonetwork/tasks/main.yml: Create webapps/geonetwork before unpacking the distribution. --- geonetwork/geonetwork/tasks/main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/geonetwork/geonetwork/tasks/main.yml b/geonetwork/geonetwork/tasks/main.yml index 2968a56f..d5fabedb 100644 --- a/geonetwork/geonetwork/tasks/main.yml +++ b/geonetwork/geonetwork/tasks/main.yml @@ -16,10 +16,6 @@ file: dest={{ geonetwork_download_directory }}/geonetwork.war state=absent when: geonetwork_upgrade - - name: Create the Geonetwork webapp directory - file: path={{ item.instance_path }}/webapps/{{ geonetwork_app_name | lower }} state=directory owner={{ item.user }} group={{ item.user }} - with_items: '{{ tomcat_m_instances }}' - - name: Download the Geonetwork file distribution get_url: url='{{ geonetwork_download_url }}' dest={{ geonetwork_download_directory }}/geonetwork.{{ geonetwork_version }}.war register: geonetwork_download @@ -27,7 +23,11 @@ - name: Remove the geonetwork webapp if we downloaded a new version file: dest={{ item.instance_path }}/webapps/{{ geonetwork_app_name | lower }} state=absent with_items: '{{ tomcat_m_instances }}' - when: ( geonetwork_download is changed ) + when: geonetwork_download is changed + + - name: Create the Geonetwork webapp directory + file: path={{ item.instance_path }}/webapps/{{ geonetwork_app_name | lower }} state=directory owner={{ item.user }} group={{ item.user }} + with_items: '{{ tomcat_m_instances }}' - name: Unpack the Geonetwork war file unarchive: copy=no src={{ geonetwork_download_directory }}/geonetwork.{{ geonetwork_version }}.war dest={{ item.instance_path }}/webapps/{{ geonetwork_app_name | lower }} creates={{ item.instance_path }}/webapps/{{ geonetwork_app_name | lower }}/WEB-INF/lib owner={{ item.user }} group={{ item.user }}