library/roles/ckan/ckan: Add support for the LIRE plugin. More python modules are needed.
This commit is contained in:
parent
235da6d111
commit
159fcdbac2
|
@ -24,7 +24,7 @@ ckan_logdir: /var/log/ckan
|
|||
ckan_db_name: ckan
|
||||
ckan_db_user: ckan
|
||||
|
||||
# The order is important
|
||||
# Order is important
|
||||
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'
|
||||
|
@ -54,6 +54,9 @@ ckan_ldap_username: uid
|
|||
ckan_ldap_email: mail
|
||||
ckan_ldap_prevent_edits: True
|
||||
ckan_ldap_fallback: True
|
||||
ckan_ckanext_lire: True
|
||||
ckan_ckanext_lire_n: lire
|
||||
ckan_ckanext_lire_url: 'https://github.com/milicp/ckanext-lire.git'
|
||||
|
||||
# Needed to install some CKAN plugins
|
||||
ckan_additional_packages:
|
||||
|
@ -61,6 +64,7 @@ ckan_additional_packages:
|
|||
- libxslt1-dev
|
||||
- gcc
|
||||
- python-dev
|
||||
- libffi-dev
|
||||
- libxml2-dev
|
||||
- zlib1g-dev
|
||||
- libxslt1-dev
|
||||
|
@ -73,6 +77,9 @@ ckan_pip_dependencies:
|
|||
- lxml
|
||||
- factory
|
||||
- python-ldap
|
||||
- rdflib
|
||||
- 'urllib3[secure]'
|
||||
- bleach
|
||||
#
|
||||
apache_additional_packages:
|
||||
- libapache2-mod-uwsgi
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
---
|
||||
- name: Install some packages dependencies
|
||||
become: False
|
||||
apt: name={{ item }} state=latest update_cache=yes
|
||||
with_items: '{{ ckan_additional_packages }}'
|
||||
when: ckan_geonetwork_harvester
|
||||
tags: [ 'ckan', 'geonetwork', 'ckan_plugins', 'ckan_pip_deps' ]
|
||||
|
||||
- name: Install some plugins dependencies inside the CKAN virtualenv
|
||||
become: True
|
||||
become_user: '{{ ckan_shell_user }}'
|
||||
pip: name={{ item }} virtualenv={{ ckan_virtenv }}
|
||||
pip: name={{ item }} virtualenv={{ ckan_virtenv }} state=latest
|
||||
with_items: '{{ ckan_pip_dependencies }}'
|
||||
when: ckan_geonetwork_harvester
|
||||
tags: [ 'ckan', 'geonetwork', 'ckan_plugins', 'ckan_pip_deps' ]
|
||||
|
||||
- name: Download the CKAN ckanext-harvest plugin
|
||||
|
@ -132,3 +131,19 @@
|
|||
when: ( install_ldap_plugin | changed )
|
||||
notify: Restart CKAN
|
||||
tags: [ 'ckan', 'ckan_ldap', 'ckan_plugins' ]
|
||||
|
||||
- name: Download the CKAN LIRE plugin code
|
||||
become: True
|
||||
become_user: '{{ ckan_shell_user }}'
|
||||
git: repo={{ ckan_ckanext_lire_url }} dest={{ ckan_virtenv }}/src/ckanext-lire
|
||||
when: ckan_ckanext_lire
|
||||
register: install_lire_plugin
|
||||
tags: [ 'ckan', 'ckan_lire', 'ckan_plugins' ]
|
||||
|
||||
- name: Install the CKAN Geonetwork plugin code
|
||||
become: True
|
||||
become_user: '{{ ckan_shell_user }}'
|
||||
shell: . /usr/lib/ckan/default/bin/activate ; cd {{ ckan_virtenv }}/src/ckanext-lire ; pip install -e ./
|
||||
when: ( install_lire_plugin | changed )
|
||||
notify: Restart CKAN
|
||||
tags: [ 'ckan', 'ckan_lire', 'ckan_plugins' ]
|
||||
|
|
Loading…
Reference in New Issue