From 5500ed9afdade8d15a4a343fb49c4d580e0e96e9 Mon Sep 17 00:00:00 2001 From: Roberto Date: Thu, 14 Feb 2019 16:00:47 +0100 Subject: [PATCH] managed web.xml inside uri-resolver webapp --- smartgears/uri_resolver/tasks/main.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/smartgears/uri_resolver/tasks/main.yml b/smartgears/uri_resolver/tasks/main.yml index 5f56e543..82421235 100644 --- a/smartgears/uri_resolver/tasks/main.yml +++ b/smartgears/uri_resolver/tasks/main.yml @@ -21,10 +21,24 @@ file: path={{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }} state=absent notify: Restart smartgears when: uri_resolver_download is changed - - - name: Copy the uri-resolver war file into the webapps directory - copy: src={{ smartgears_downloads_dir }}/{{ uri_resolver_file }} dest={{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }}.{{ uri_resolver_extension }} remote_src=yes force=yes - notify: Restart smartgears + + - name: Create the uri-resolver webapp directory + file: dest={{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }} state=directory + when: uri_resolver_download + + - name: Unarchive the uri_resolver war file + unarchive: copy=no src={{ smartgears_downloads_dir }}/{{ uri_resolver_file }} dest={{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }} + args: + creates: '{{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }}/WEB-INF/web.xml' + notify: Restart smartgears + + - name: Install the uri_resolver web.xml template + template: src=uri-resolver-web.xml.j2 dest={{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }}/WEB-INF/web.xml mode=0440 + notify: Restart smartgears + +# - name: Copy the uri-resolver war file into the webapps directory +# copy: src={{ smartgears_downloads_dir }}/{{ uri_resolver_file }} dest={{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }}.{{ uri_resolver_extension }} remote_src=yes force=yes +# notify: Restart smartgears become: True become_user: '{{ d4science_user }}'