Add the option to remove the GA plugin when upgrading it

This commit is contained in:
Andrea Dell'Amico 2023-06-21 10:45:19 +02:00
parent 5e8758171a
commit 97fd440a40
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 10 additions and 1 deletions

View File

@ -69,7 +69,8 @@ ckan_oai_pm: False
ckan_oai_pm_name: oaipmh
ckan_oai_pm_state: absent
# Google analytics
ckan_google_analytics: False
ckan_google_analytics: false
ckan_force_google_analytics_upgrade: false
ckan_ga_plugin_state: '{{ ckan_plugins_state }}'
ckan_google_analytics_name: googleanalytics
ckan_google_analytics_version: 'v2.0.4'

View File

@ -208,6 +208,14 @@
notify: Restart CKAN
tags: [ 'ckan', 'ckan_google_analytics', 'ckan_plugins' ]
- name: Force the removal of the CKAN Google Analytics plugin code
file: /usr/lib/ckan/default/src/ckanext-googleanalytics
state: absent
when:
- ckan_google_analytics | bool
- ckan_force_google_analytics_upgrade
tags: [ 'ckan', 'ckan_google_analytics', 'ckan_plugins' ]
- name: Download the CKAN google analytics plugin
pip:
name: '{{ ckan_google_analytics_url }}'