forked from ISTI-ansible-roles/ansible-role-ckan
Fixes 21386. Fix the ckan 2.6 python version.
This commit is contained in:
parent
d2a580a0b2
commit
cafa075542
|
@ -40,7 +40,7 @@
|
||||||
tags: [ 'ckan', 'geonetwork', 'ckan_plugins' ]
|
tags: [ 'ckan', 'geonetwork', 'ckan_plugins' ]
|
||||||
|
|
||||||
- name: Download the CKAN ckanext-spatial plugin
|
- name: Download the CKAN ckanext-spatial plugin
|
||||||
pip: name='{{ ckan_ckanext_spatial_url }}' virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }} editable=True
|
pip: name='{{ ckan_ckanext_spatial_url }}' virtualenv={{ ckan_virtenv }} state=present editable=True
|
||||||
notify: Restart CKAN
|
notify: Restart CKAN
|
||||||
when: ckan_geonetwork_harvester | bool
|
when: ckan_geonetwork_harvester | bool
|
||||||
register: ckanext_spatial_install
|
register: ckanext_spatial_install
|
||||||
|
@ -59,13 +59,13 @@
|
||||||
tags: [ 'ckan', 'ckan_spatial', 'ckan_plugins' ]
|
tags: [ 'ckan', 'ckan_spatial', 'ckan_plugins' ]
|
||||||
|
|
||||||
- name: Download the CKAN ckanext-geoview plugin
|
- name: Download the CKAN ckanext-geoview plugin
|
||||||
pip: name='{{ ckan_geoview_url }}' virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }}
|
pip: name='{{ ckan_geoview_url }}' virtualenv={{ ckan_virtenv }} state=present
|
||||||
notify: Restart CKAN
|
notify: Restart CKAN
|
||||||
when: ckan_geoview | bool
|
when: ckan_geoview | bool
|
||||||
tags: [ 'ckan', 'ckan_geoview', 'ckan_plugins' ]
|
tags: [ 'ckan', 'ckan_geoview', 'ckan_plugins' ]
|
||||||
|
|
||||||
- name: Download the latest version of the CKAN ckanext-dcat plugin code on CKAN version >= 2.8
|
- name: Download the latest version of the CKAN ckanext-dcat plugin code on CKAN version >= 2.8
|
||||||
pip: name={{ ckan_dcat_url }} virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }} editable=True
|
pip: name={{ ckan_dcat_url }} virtualenv={{ ckan_virtenv }} state=present editable=True
|
||||||
when:
|
when:
|
||||||
- ckan_dcat | bool
|
- ckan_dcat | bool
|
||||||
- ckan_version is version_compare('2.8', '>=')
|
- ckan_version is version_compare('2.8', '>=')
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
tags: [ 'ckan', 'ckan_dcat', 'ckan_plugins' ]
|
tags: [ 'ckan', 'ckan_dcat', 'ckan_plugins' ]
|
||||||
|
|
||||||
- name: Download the CKAN ckanext-dcat plugin code. Stick to version 1.0.0 on CKAN < 2.8
|
- name: Download the CKAN ckanext-dcat plugin code. Stick to version 1.0.0 on CKAN < 2.8
|
||||||
pip: name={{ ckan_dcat_1_0_0_url }} virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }} editable=True
|
pip: name={{ ckan_dcat_1_0_0_url }} virtualenv={{ ckan_virtenv }} state=present editable=True
|
||||||
when:
|
when:
|
||||||
- ckan_dcat | bool
|
- ckan_dcat | bool
|
||||||
- ckan_version is version_compare('2.8', '<')
|
- ckan_version is version_compare('2.8', '<')
|
||||||
|
@ -109,13 +109,13 @@
|
||||||
tags: [ 'ckan', 'ckan_geonetwork', 'ckan_plugins', 'tracker' ]
|
tags: [ 'ckan', 'ckan_geonetwork', 'ckan_plugins', 'tracker' ]
|
||||||
|
|
||||||
- name: Download the CKAN PDF viewer plugin
|
- name: Download the CKAN PDF viewer plugin
|
||||||
pip: name='{{ ckan_ckanext_pdfview_url }}' virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }}
|
pip: name='{{ ckan_ckanext_pdfview_url }}' virtualenv={{ ckan_virtenv }} state=present
|
||||||
when: ckan_pdfview | bool
|
when: ckan_pdfview | bool
|
||||||
notify: Restart CKAN
|
notify: Restart CKAN
|
||||||
tags: [ 'ckan', 'ckan_pdfview', 'ckan_plugins' ]
|
tags: [ 'ckan', 'ckan_pdfview', 'ckan_plugins' ]
|
||||||
|
|
||||||
- name: Download the CKAN Privatedatasets extension for CKAN 2.8
|
- name: Download the CKAN Privatedatasets extension for CKAN 2.8
|
||||||
pip: name='{{ ckan_privatedatasets_url }}' virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }}
|
pip: name='{{ ckan_privatedatasets_url }}' virtualenv={{ ckan_virtenv }} state=present
|
||||||
when:
|
when:
|
||||||
- ckan_privatedatasets | bool
|
- ckan_privatedatasets | bool
|
||||||
- ckan_version is version_compare('2.8', '>=')
|
- ckan_version is version_compare('2.8', '>=')
|
||||||
|
@ -123,7 +123,7 @@
|
||||||
tags: [ 'ckan', 'ckan_privdatasets', 'ckan_plugins' ]
|
tags: [ 'ckan', 'ckan_privdatasets', 'ckan_plugins' ]
|
||||||
|
|
||||||
- name: Download the CKAN Privatedatasets extension for CKAN 2.6
|
- name: Download the CKAN Privatedatasets extension for CKAN 2.6
|
||||||
pip: name='{{ ckan_privatedatasets_url }}' virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }} version=0.2.19
|
pip: name='{{ ckan_privatedatasets_url }}' virtualenv={{ ckan_virtenv }} state=present version=0.2.19
|
||||||
when:
|
when:
|
||||||
- ckan_privatedatasets | bool
|
- ckan_privatedatasets | bool
|
||||||
- ckan_version is version_compare('2.8', '<')
|
- ckan_version is version_compare('2.8', '<')
|
||||||
|
@ -131,13 +131,13 @@
|
||||||
tags: [ 'ckan', 'ckan_privdatasets', 'ckan_plugins' ]
|
tags: [ 'ckan', 'ckan_privdatasets', 'ckan_plugins' ]
|
||||||
|
|
||||||
- name: Download the CKAN hierarchy plugin code
|
- name: Download the CKAN hierarchy plugin code
|
||||||
pip: name='{{ ckan_hierarchy_url }}' virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }} editable=True
|
pip: name='{{ ckan_hierarchy_url }}' virtualenv={{ ckan_virtenv }} state=present editable=True
|
||||||
when: ckan_hierarchy | bool
|
when: ckan_hierarchy | bool
|
||||||
notify: Restart CKAN
|
notify: Restart CKAN
|
||||||
tags: [ 'ckan', 'ckan_hierarchy', 'ckan_plugins' ]
|
tags: [ 'ckan', 'ckan_hierarchy', 'ckan_plugins' ]
|
||||||
|
|
||||||
- name: Download the CKAN pages plugin code
|
- name: Download the CKAN pages plugin code
|
||||||
pip: name='{{ ckan_pages_url }}' virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }} editable=True
|
pip: name='{{ ckan_pages_url }}' virtualenv={{ ckan_virtenv }} state=present editable=True
|
||||||
when: ckan_pages | bool
|
when: ckan_pages | bool
|
||||||
notify: Restart CKAN
|
notify: Restart CKAN
|
||||||
tags: [ 'ckan', 'ckan_pages', 'ckan_plugins' ]
|
tags: [ 'ckan', 'ckan_pages', 'ckan_plugins' ]
|
||||||
|
@ -167,37 +167,37 @@
|
||||||
tags: [ 'ckan', 'ckan_lire', 'ckan_plugins' ]
|
tags: [ 'ckan', 'ckan_lire', 'ckan_plugins' ]
|
||||||
|
|
||||||
- name: Download the KATA CKAN OAI-PMH plugin
|
- name: Download the KATA CKAN OAI-PMH plugin
|
||||||
pip: name='{{ ckan_oai_pmh_url }}' virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }} editable=True
|
pip: name='{{ ckan_oai_pmh_url }}' virtualenv={{ ckan_virtenv }} state=present editable=True
|
||||||
when: ckan_kata_oai_pmh | bool
|
when: ckan_kata_oai_pmh | bool
|
||||||
notify: Restart CKAN
|
notify: Restart CKAN
|
||||||
tags: [ 'ckan', 'ckan_oai_pmh', 'ckan_plugins' ]
|
tags: [ 'ckan', 'ckan_oai_pmh', 'ckan_plugins' ]
|
||||||
|
|
||||||
- name: Download the KATA CKAN ckanext-oaiphm requirements
|
- name: Download the KATA CKAN ckanext-oaiphm requirements
|
||||||
pip: requirements={{ ckan_virtenv }}/src/ckanext-oaipmh/requirements.txt virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }}
|
pip: requirements={{ ckan_virtenv }}/src/ckanext-oaipmh/requirements.txt virtualenv={{ ckan_virtenv }} state=present
|
||||||
when: ckan_kata_oai_pmh | bool
|
when: ckan_kata_oai_pmh | bool
|
||||||
notify: Restart CKAN
|
notify: Restart CKAN
|
||||||
tags: [ 'ckan', 'ckan_oai_pmh', 'ckan_plugins' ]
|
tags: [ 'ckan', 'ckan_oai_pmh', 'ckan_plugins' ]
|
||||||
|
|
||||||
- name: Download the KATA CKAN plugin
|
- name: Download the KATA CKAN plugin
|
||||||
pip: name='{{ ckan_oai_pmh_kata_plugin_url }}' virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }} editable=True
|
pip: name='{{ ckan_oai_pmh_kata_plugin_url }}' virtualenv={{ ckan_virtenv }} state=present editable=True
|
||||||
when: ckan_kata_oai_pmh | bool
|
when: ckan_kata_oai_pmh | bool
|
||||||
notify: Restart CKAN
|
notify: Restart CKAN
|
||||||
tags: [ 'ckan', 'ckan_oai_pmh', 'ckan_plugins' ]
|
tags: [ 'ckan', 'ckan_oai_pmh', 'ckan_plugins' ]
|
||||||
|
|
||||||
- name: Download the KATA CKAN requirements
|
- name: Download the KATA CKAN requirements
|
||||||
pip: requirements={{ ckan_virtenv }}/src/ckanext-kata/requirements.txt virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }}
|
pip: requirements={{ ckan_virtenv }}/src/ckanext-kata/requirements.txt virtualenv={{ ckan_virtenv }} state=present
|
||||||
when: ckan_kata_oai_pmh | bool
|
when: ckan_kata_oai_pmh | bool
|
||||||
notify: Restart CKAN
|
notify: Restart CKAN
|
||||||
tags: [ 'ckan', 'ckan_oai_pmh', 'ckan_plugins' ]
|
tags: [ 'ckan', 'ckan_oai_pmh', 'ckan_plugins' ]
|
||||||
|
|
||||||
- name: Download the opendatasoft CKAN OAI-PMH plugin
|
- name: Download the opendatasoft CKAN OAI-PMH plugin
|
||||||
pip: name='{{ ckan_oai_pm_url }}' virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }} editable=True
|
pip: name='{{ ckan_oai_pm_url }}' virtualenv={{ ckan_virtenv }} state=present editable=True
|
||||||
when: ckan_oai_pm | bool
|
when: ckan_oai_pm | bool
|
||||||
notify: Restart CKAN
|
notify: Restart CKAN
|
||||||
tags: [ 'ckan', 'ckan_oai_pm', 'ckan_plugins' ]
|
tags: [ 'ckan', 'ckan_oai_pm', 'ckan_plugins' ]
|
||||||
|
|
||||||
- name: Download the CKAN google analytics plugin python requirements
|
- name: Download the CKAN google analytics plugin python requirements
|
||||||
pip: name='genshi' virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }}
|
pip: name='genshi' virtualenv={{ ckan_virtenv }} state=present
|
||||||
when: ckan_google_analytics | bool
|
when: ckan_google_analytics | bool
|
||||||
notify: Restart CKAN
|
notify: Restart CKAN
|
||||||
tags: [ 'ckan', 'ckan_google_analytics', 'ckan_plugins' ]
|
tags: [ 'ckan', 'ckan_google_analytics', 'ckan_plugins' ]
|
||||||
|
@ -216,7 +216,7 @@
|
||||||
tags: [ 'ckan', 'ckan_google_analytics', 'ckan_plugins' ]
|
tags: [ 'ckan', 'ckan_google_analytics', 'ckan_plugins' ]
|
||||||
|
|
||||||
- name: Download the CKAN google analytics reports plugin
|
- name: Download the CKAN google analytics reports plugin
|
||||||
pip: name='{{ ckan_ga_reports_url }}' virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }} editable=True
|
pip: name='{{ ckan_ga_reports_url }}' virtualenv={{ ckan_virtenv }} state=present editable=True
|
||||||
when: ckan_ga_reports | bool
|
when: ckan_ga_reports | bool
|
||||||
register: install_ckan_ga_reports
|
register: install_ckan_ga_reports
|
||||||
tags: [ 'ckan', 'ckan_google_analytics', 'ckan_ga_reports', 'ckan_plugins' ]
|
tags: [ 'ckan', 'ckan_google_analytics', 'ckan_ga_reports', 'ckan_plugins' ]
|
||||||
|
@ -245,7 +245,7 @@
|
||||||
tags: [ 'ckan', 'ckan_star_ratings', 'ckan_plugins' ]
|
tags: [ 'ckan', 'ckan_star_ratings', 'ckan_plugins' ]
|
||||||
|
|
||||||
- name: Install the CKAN profiler plugin
|
- name: Install the CKAN profiler plugin
|
||||||
pip: name='{{ ckan_profiler_url }}' virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }} editable=True
|
pip: name='{{ ckan_profiler_url }}' virtualenv={{ ckan_virtenv }} state=present editable=True
|
||||||
when: ckan_profiler | bool
|
when: ckan_profiler | bool
|
||||||
notify: Restart CKAN
|
notify: Restart CKAN
|
||||||
tags: [ 'ckan', 'ckan_profiler', 'ckan_plugins' ]
|
tags: [ 'ckan', 'ckan_profiler', 'ckan_plugins' ]
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
---
|
---
|
||||||
|
- name: Create the CKAN user
|
||||||
|
user: name={{ ckan_shell_user }} home={{ ckan_libdir }} createhome=no shell=/usr/sbin/nologin system=yes
|
||||||
|
|
||||||
- name: Download the CKAN distribution
|
- name: Download the CKAN distribution
|
||||||
get_url: url='{{ ckan_package_url }}' dest=/srv/{{ ckan_deb_file }} force=yes
|
get_url: url='{{ ckan_package_url }}' dest=/srv/{{ ckan_deb_file }} force=yes
|
||||||
tags: [ 'ckan', 'ckan_pkg' ]
|
tags: [ 'ckan', 'ckan_pkg' ]
|
||||||
|
@ -8,8 +11,12 @@
|
||||||
register: ckan_install
|
register: ckan_install
|
||||||
tags: [ 'ckan', 'ckan_pkg' ]
|
tags: [ 'ckan', 'ckan_pkg' ]
|
||||||
|
|
||||||
- name: Create the CKAN user
|
- name: Fix the python version in the CKAN virtualenv
|
||||||
user: name={{ ckan_shell_user }} home={{ ckan_libdir }} createhome=no shell=/usr/sbin/nologin system=yes
|
unarchive:
|
||||||
|
src: 'https://ftp.d4science.org/ubuntu-misc-binaries/ckan-default-python-2.7.14.tar.gz'
|
||||||
|
dest: '{{ ckan_libdir }}'
|
||||||
|
remote_src: yes
|
||||||
|
creates: '{{ ckan_virtenv }}/bin/get-pip.py'
|
||||||
|
|
||||||
- name: Configure the CKAN production configuration file excluding the plugins list
|
- name: Configure the CKAN production configuration file excluding the plugins list
|
||||||
ini_file: dest={{ ckan_config_file }} section={{ item.section }} option={{ item.option }} value={{ item.value }} state={{ item.state }} backup=yes
|
ini_file: dest={{ ckan_config_file }} section={{ item.section }} option={{ item.option }} value={{ item.value }} state={{ item.state }} backup=yes
|
||||||
|
@ -23,12 +30,17 @@
|
||||||
tags: [ 'ckan', 'apache', 'ckan_pkg' ]
|
tags: [ 'ckan', 'apache', 'ckan_pkg' ]
|
||||||
|
|
||||||
- name: Create the base directory for the CKAN file storage
|
- name: Create the base directory for the CKAN file storage
|
||||||
file: dest={{ ckan_file_storage_dir }} state=directory owner={{ apache_user }} group={{ ckan_shell_user }} mode=2770
|
file:
|
||||||
tags: ckan
|
dest: '{{ ckan_file_storage_dir }}'
|
||||||
|
state: directory
|
||||||
|
owner: '{{ apache_user }}'
|
||||||
|
group: '{{ ckan_shell_user }}'
|
||||||
|
mode: '2770'
|
||||||
|
tags: [ 'ckan' ]
|
||||||
|
|
||||||
- name: Fix the CKAN harvesting storage permissions
|
- name: Fix the CKAN harvesting storage permissions
|
||||||
file: dest={{ ckan_file_harvesting_dir }} state=directory owner={{ apache_user }} group={{ ckan_shell_user }} mode=2770 recurse=yes
|
file: dest={{ ckan_file_harvesting_dir }} state=directory owner={{ apache_user }} group={{ ckan_shell_user }} mode='2770' recurse=yes
|
||||||
tags: ckan
|
tags: [ 'ckan' ]
|
||||||
|
|
||||||
- name: authorization file for the psql command, if the database is on a remote server
|
- name: authorization file for the psql command, if the database is on a remote server
|
||||||
template: src=pgpass.j2 dest=/root/.pgpass owner=root mode=0600
|
template: src=pgpass.j2 dest=/root/.pgpass owner=root mode=0600
|
||||||
|
@ -40,14 +52,14 @@
|
||||||
args:
|
args:
|
||||||
creates: '{{ ckan_libdir }}/.ckan_db_initialized'
|
creates: '{{ ckan_libdir }}/.ckan_db_initialized'
|
||||||
when: ckan_init_db_and_solr
|
when: ckan_init_db_and_solr
|
||||||
tags: ckan
|
tags: [ 'ckan' ]
|
||||||
|
|
||||||
- name: Initialize the CKAN datastore database
|
- name: Initialize the CKAN datastore database
|
||||||
shell: ckan datastore set-permissions | psql --set ON_ERROR_STOP=1 -h {{ psql_db_host }} -U {{ ckan_db_user }} -w {{ ckan_datastore_db_name }} && touch {{ ckan_libdir }}/.ckan_datastore_db_initialized
|
shell: ckan datastore set-permissions | psql --set ON_ERROR_STOP=1 -h {{ psql_db_host }} -U {{ ckan_db_user }} -w {{ ckan_datastore_db_name }} && touch {{ ckan_libdir }}/.ckan_datastore_db_initialized
|
||||||
args:
|
args:
|
||||||
creates: '{{ ckan_libdir }}/.ckan_datastore_db_initialized'
|
creates: '{{ ckan_libdir }}/.ckan_datastore_db_initialized'
|
||||||
when: ckan_init_db_and_solr
|
when: ckan_init_db_and_solr
|
||||||
tags: ckan
|
tags: [ 'ckan' ]
|
||||||
|
|
||||||
- name: Create the pip cache directory with the right permissions
|
- name: Create the pip cache directory with the right permissions
|
||||||
file: dest={{ ckan_libdir }}/.cache owner={{ ckan_shell_user }} group={{ ckan_shell_user }} state=directory
|
file: dest={{ ckan_libdir }}/.cache owner={{ ckan_shell_user }} group={{ ckan_shell_user }} state=directory
|
||||||
|
|
Loading…
Reference in New Issue