--- - block: - name: Remove the old uri-resolver files file: path={{ item }} state=absent with_items: - '{{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }}' - '{{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }}.{{ uri_resolver_extension }}' notify: Restart smartgears become: True become_user: '{{ d4science_user }}' tags: [ 'smartgears', 'uri_resolver', 'tomcat' ] when: not smartgears_uri_resolver_install - block: - name: Get the uri-resolver war maven_artifact: artifact_id={{ uri_resolver_name }} version={{ uri_resolver_version | default(omit) }} group_id={{ uri_resolver_group_id }} extension={{ uri_resolver_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ uri_resolver_file }} verify_checksum=always register: uri_resolver_download - name: Remove the old uri-resolver files 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 become: True become_user: '{{ d4science_user }}' tags: [ 'smartgears', 'uri_resolver', 'tomcat' ] when: smartgears_uri_resolver_install