From ae815241d3f71fbbd411b6bc371a663893377d06 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 16 Mar 2017 17:46:45 +0100 Subject: [PATCH] library/roles/ckan/ckan: we need to manage two additional plugins, see https://support.d4science.org/issues/7324 and https://support.d4science.org/issues/7441 d4science-ghn-cluster/group_vars/ckan_dev/ckan_dev.yml: Enable the dcat and geoview plugins on CKAN dev. --- ckan/ckan/defaults/main.yml | 9 +++++++++ ckan/ckan/tasks/ckan-plugins.yml | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/ckan/ckan/defaults/main.yml b/ckan/ckan/defaults/main.yml index 71cae24d..8d9c56af 100644 --- a/ckan/ckan/defaults/main.yml +++ b/ckan/ckan/defaults/main.yml @@ -32,6 +32,15 @@ ckan_geonetwork_harvester: False ckan_ckanext_harvester_url: 'git+https://github.com/ckan/ckanext-harvest.git#egg=ckanext-harvest' ckan_ckanext_spatial_url: 'git+https://github.com/okfn/ckanext-spatial.git#egg=ckanext-spatial' ckan_geonetwork_harvester_url: 'https://github.com/geosolutions-it/ckanext-geonetwork.git' +ckan_geoview: False +ckan_geoview_url: ckanext-geoview +ckan_geoview_name: resource_proxy +ckan_dcat: False +ckan_dcat_url: 'git+https://github.com/ckan/ckanext-dcat.git#egg=ckanext-dcat' +# dcat implement harvesters too. +# ckan_dcat_name: 'dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface' +ckan_dcat_name: 'dcat dcat_json_interface' + # Set this to true to install a cron job that regularly runs the harvesters ckan_harvester_run: False ckan_pdfview: False diff --git a/ckan/ckan/tasks/ckan-plugins.yml b/ckan/ckan/tasks/ckan-plugins.yml index d96928c3..5d256d79 100644 --- a/ckan/ckan/tasks/ckan-plugins.yml +++ b/ckan/ckan/tasks/ckan-plugins.yml @@ -51,6 +51,24 @@ when: ( ckanext_spatial_install | changed ) tags: [ 'ckan', 'ckan_spatial', 'ckan_plugins' ] + - name: Download the CKAN ckanext-geoview plugin + pip: name='{{ ckan_geoview_url }}' virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }} + notify: Restart CKAN + when: ckan_geoview + tags: [ 'ckan', 'ckan_geoview', 'ckan_plugins' ] + + - name: Download the CKAN ckanext-dcat plugin code + pip: name={{ ckan_dcat_url }} virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }} + when: ckan_dcat + notify: Restart CKAN + tags: [ 'ckan', 'ckan_dcat', 'ckan_plugins' ] + + - name: Download the CKAN ckanext-dcat requirements + pip: requirements={{ ckan_virtenv }}/src/ckanext-dcat/requirements.txt virtualenv={{ ckan_virtenv }} state=present + when: ckan_dcat + notify: Restart CKAN + tags: [ 'ckan', 'ckan_dcat', 'ckan_plugins' ] + - name: Download the CKAN Geonetwork plugin code git: repo={{ ckan_geonetwork_harvester_url }} dest=/usr/lib/ckan/default/src/ckanext-geonetwork when: ckan_geonetwork_harvester