From b46ffd1f529081b5893241b561cedf37d3cd2d5f Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Tue, 29 Nov 2016 19:22:43 +0100 Subject: [PATCH] library/roles/ckan/ckan: Fix the google analytics plugin installation. d4science-ghn-cluster: Setup the google analytics plugin for all the CKAN production instances. --- ckan/ckan/defaults/main.yml | 1 + ckan/ckan/tasks/ckan-plugins.yml | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/ckan/ckan/defaults/main.yml b/ckan/ckan/defaults/main.yml index 8f1e46c..80cfee7 100644 --- a/ckan/ckan/defaults/main.yml +++ b/ckan/ckan/defaults/main.yml @@ -68,6 +68,7 @@ ckan_oai_pmh_url: 'https://github.com/kata-csc/ckanext-oaipmh.git' ckan_google_analytics: False ckan_google_analytics_name: googleanalytics ckan_google_analytics_url: 'git+https://github.com/ckan/ckanext-googleanalytics.git#egg=ckanext-googleanalytics' +ckan_google_analytics_fixed_file: 'http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-catalogue/ckan-d4science-extension/plugins/googleanalytics/plugin.py' # Google analytics reports ckan_ga_reports: False ckan_ga_reports_name: ga-report diff --git a/ckan/ckan/tasks/ckan-plugins.yml b/ckan/ckan/tasks/ckan-plugins.yml index f202970..d96928c 100644 --- a/ckan/ckan/tasks/ckan-plugins.yml +++ b/ckan/ckan/tasks/ckan-plugins.yml @@ -145,6 +145,11 @@ register: install_ckan_google_analytics tags: [ 'ckan', 'ckan_google_analytics', 'ckan_plugins' ] + - name: Install a fix for the CKAN google analytics plugin + get_url: url={{ ckan_google_analytics_fixed_file }} dest=/usr/lib/ckan/default/src/ckanext-googleanalytics/ckanext/googleanalytics/plugin.py force=yes + when: ckan_google_analytics + tags: [ 'ckan', 'ckan_google_analytics', 'ckan_plugins' ] + - name: Setup the CKAN google analytics plugin shell: . /usr/lib/ckan/default/bin/activate ; cd /usr/lib/ckan/default/src/ckanext-googleanalytics ; python setup.py develop when: ( install_ckan_google_analytics | changed )