library/roles/geonetwork/geonetwork/tasks/main.yml: Create webapps/geonetwork before unpacking the distribution.

This commit is contained in:
Andrea Dell'Amico 2018-08-03 18:57:23 +02:00
parent 4901a70b5c
commit 380f0f3310
1 changed files with 5 additions and 5 deletions

View File

@ -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 }}