2016-06-24 18:42:41 +02:00
|
|
|
---
|
|
|
|
- block:
|
2016-07-13 18:30:56 +02:00
|
|
|
|
|
|
|
- name: Remove the installed CKAN connector before upgrading
|
2016-07-13 19:04:28 +02:00
|
|
|
file: dest={{ item }} state=absent
|
|
|
|
with_items:
|
|
|
|
- '{{ smartgears_instance_path }}/webapps/ckan-connector'
|
|
|
|
- '{{ smartgears_instance_path }}/webapps/ckan-connector.war'
|
2016-07-13 18:30:56 +02:00
|
|
|
when: smartgears_upgrade
|
|
|
|
|
2016-06-24 18:42:41 +02:00
|
|
|
- name: Get the CKAN connector war file
|
2016-06-27 15:36:37 +02:00
|
|
|
get_url: url={{ ckan_connector_url }} dest={{ smartgears_instance_path }}/webapps/{{ ckan_connector_war_file }}
|
|
|
|
|
2016-06-24 18:42:41 +02:00
|
|
|
- name: Unpack the CKAN connector war file
|
|
|
|
shell: mkdir {{ smartgears_instance_path }}/webapps/ckan-connector ; cd {{ smartgears_instance_path }}/webapps/ckan-connector ; jar xf {{ smartgears_instance_path }}/webapps/{{ ckan_connector_war_file }}
|
|
|
|
args:
|
|
|
|
creates: '{{ smartgears_instance_path }}/webapps/ckan-connector/WEB-INF/web.xml'
|
|
|
|
|
|
|
|
- name: Install the CKAN connector web.xml template
|
|
|
|
template: src=ckan-web.xml.j2 dest={{ smartgears_instance_path }}/webapps/ckan-connector/WEB-INF/web.xml mode=0440
|
|
|
|
|
|
|
|
- name: Install the CKAN connector fixer script
|
|
|
|
become: False
|
|
|
|
template: src=ckan-connector-fixer.sh.j2 dest=/usr/local/bin/ckan-connector-fixer owner=root group=root mode=0550
|
|
|
|
|
|
|
|
- name: Fix the CKAN connector web.xml
|
|
|
|
become: False
|
|
|
|
shell: /usr/local/bin/ckan-connector-fixer
|
|
|
|
args:
|
|
|
|
creates: '{{ smartgears_instance_path }}/webapps/ckan-connector/WEB-INF/.web.xml.configured'
|
|
|
|
notify: Restart smartgears
|
|
|
|
|
|
|
|
become: True
|
|
|
|
become_user: '{{ smartgears_user }}'
|
|
|
|
when: ckan_connector_plugin_install
|
|
|
|
tags: [ 'smartgears', 'ckan', 'ckan_connector', 'tomcat' ]
|