library/roles/ckan/ckan: Fix the google analytics plugin installation.

d4science-ghn-cluster: Setup the google analytics plugin for all the CKAN production instances.
This commit is contained in:
Andrea Dell'Amico 2016-11-29 19:22:43 +01:00
parent daa0a3af35
commit b46ffd1f52
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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 )