--- - block: - name: Remove the old social-networking-library-ws files file: path={{ smartgears_instance_path }}/webapps/{{ social_networking_library_ws_name }} state=absent become: True become_user: '{{ d4science_user }}' when: ( not social_networking_library_ws_install ) or ( smartgears_upgrade ) tags: [ 'smartgears', 'social_networking_library_ws', 'tomcat' ] - block: # NOTE: Install as the smartgears user so we do not mess with the permissions - name: Get the social-networking-library-ws war maven_artifact: artifact_id={{ social_networking_library_ws_name }} version={{ social_networking_library_ws_version | default(omit) }} group_id={{ social_networking_library_ws_group_id }} extension={{ social_networking_library_ws_extension | default('war') }} repository_url={{ social_networking_library_ws_repository_url }} dest={{ smartgears_user_home }}/{{ social_networking_library_ws_file }} - name: Create the data trasfer working directory file: path={{ smartgears_instance_path }}/webapps/{{ social_networking_library_ws_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }} - name: Unarchive the social_networking_library_ws war unarchive: copy=no src={{ smartgears_user_home }}/{{ social_networking_library_ws_file }} dest={{ smartgears_instance_path }}/webapps/{{ social_networking_library_ws_name }} creates={{ smartgears_instance_path }}/webapps/{{ social_networking_library_ws_name }}/WEB-INF/lib notify: Restart smartgears become: True become_user: '{{ d4science_user }}' when: social_networking_library_ws_install tags: [ 'smartgears', 'social_networking_library_ws', 'tomcat' ]