--- - block: - name: Remove the old igcat controller plugin file: dest={{ smartgears_instance_path }}/webapps/{{ gfeed_service_name }}/WEB-INF/lib/plugins/{{ gcat_controller_plugin_name }} state=absent become: True become_user: '{{ smartgears_user }}' when: not gcat_controller_plugin_install tags: [ 'smartgears', 'gcat_plugin', 'tomcat' ] - block: - name: Get the gcat plugin gfeed uber jar maven_artifact: artifact_id={{ gcat_controller_plugin_name }} version={{ gcat_plugin_dt_plugin_version }} group_id={{ sis_geotk_dt_plugin_group_id }} extension={{ sis_geotk_dt_plugin_extension }} repository_url={{ smartgears_global_base_url }} classifier={{ sis_geotk_dt_plugin_classifier }} dest={{ smartgears_downloads_dir }}/{{ sis_geotk_dt_plugin_uber_file }} verify_checksum=always register: gcat_plugin_download - name: Remove the old gcat plugin gfeed plugin file: dest={{ smartgears_instance_path }}/webapps/{{ gfeed_service_name }}/WEB-INF/lib/plugins/{{ gcat_controller_plugin_name }} state=absent when: gcat_plugin_download is changed - name: Create the plugin directory inside gfeed file: dest={{ smartgears_instance_path }}/webapps/{{ gfeed_service_name }}/WEB-INF/lib/plugins/{{ gcat_controller_plugin_name }} state=directory register: gcat_plugin_create_dir - name: Unarchive the gcat plugin gfeed uber jar to expose its libraries unarchive: src={{ smartgears_downloads_dir }}/{{ gcat_controller_plugin_uber_file }} dest={{ smartgears_instance_path }}/webapps/{{ gfeed_service_name }}/WEB-INF/lib/plugins/{{ gcat_plugin_dt_plugin_name }}/ copy=no when: gcat_plugin_create_dir is changed notify: Restart smartgears - name: Get the gcat plugin gfeed jar maven_artifact: artifact_id={{ gcat_controller_plugin_name }} version={{ gcat_plugin_dt_plugin_version }} group_id={{ sis_geotk_dt_plugin_group_id }} extension={{ sis_geotk_dt_plugin_extension }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_instance_path }}/webapps/{{ gfeed_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }} keep_name=yes notify: Restart smartgears - name: Remove the gcat plugin uber jar org and META-INF directories file: dest={{ smartgears_instance_path }}/webapps/{{ gfeed_service_name }}/WEB-INF/lib/plugins/{{ gcat_controller_plugin_name }}/{{ item }} state=absent with_items: - org - 'META-INF' notify: Restart smartgears become: True become_user: '{{ smartgears_user }}' when: gcat_controller_plugin_install tags: [ 'smartgears', 'gcat_plugin', 'tomcat' ]