library/roles/ckan/ckan: Insert the plugins list into the CKAN configuration as the last step.

d4science-ghn-cluster/group_vars/ckan_prod/ckan_prod.yml: The production portals need to access the CKAN db
This commit is contained in:
Andrea Dell'Amico 2016-06-21 18:10:15 +02:00
parent 68f076b334
commit fc3c424df1
4 changed files with 18 additions and 9 deletions

View File

@ -82,29 +82,30 @@ apache_additional_modules:
- uwsgi
ckan_production_ini_opts:
- { section: 'app:main', option: 'ckan.site_id', value: 'd4s_dev', state: 'present' }
- { section: 'app:main', option: 'ckan.site_id', value: 'ckan_installation', state: 'present' }
- { section: 'app:main', option: 'sqlalchemy.url', value: 'postgresql://{{ ckan_db_user }}:{{ ckan_db_pwd }}@{{ psql_db_host }}/{{ ckan_db_name }}', state: 'present' }
- { section: 'app:main', option: 'ckan.site_url', value: 'http://{{ ansible_fqdn }}', state: 'present' }
- { section: 'app:main', option: 'solr_url', value: 'http://127.0.0.1:{{ ckan_solr_port }}/solr', state: 'present' }
- { section: 'app:main', option: 'ckan.datastore.write_url', value: 'postgresql://{{ ckan_db_user }}:{{ ckan_db_pwd }}@{{ psql_db_host }}/{{ ckan_datastore_db_name }}', state: 'present' }
- { section: 'app:main', option: 'ckan.datastore.read_url', value: 'postgresql://{{ ckan_datastore_db_reader }}:{{ ckan_db_pwd }}@{{ psql_db_host }}/{{ ckan_datastore_db_name }}', state: 'present' }
# - { section: 'app:main', option: 'ckan.plugins', value: 'stats text_view image_view recline_view', state: 'present' }
- { section: 'app:main', option: 'ckan.plugins', value: 'stats text_view image_view recline_view datastore datapusher harvest', state: 'present' }
- { section: 'app:main', option: 'ckan.site_title', value: 'D4Science CKAN development installation', state: 'present' }
- { section: 'app:main', option: 'ckan.site_logo', value: '/base/images/ckan-logo.png', state: 'present' }
- { section: 'app:main', option: 'ckan.max_resource_size', value: '10', state: 'present' }
- { section: 'app:main', option: 'ckan.max_image_size', value: '2', state: 'present' }
- { section: 'app:main', option: 'ckan.tracking_enabled', value: 'true', state: 'present' }
- { section: 'app:main', option: 'ckan.privatedatasets.show_acquire_url_on_create', value: 'true', state: 'present' }
- { section: 'app:main', option: 'ckan.privatedatasets.show_acquire_url_on_edit', value: 'true', state: 'present' }
ckan_production_ini_plugins_opts:
- { section: 'app:main', option: 'ckan.plugins', value: 'stats text_view image_view recline_view datastore datapusher harvest', state: 'present' }
- { section: 'app:main', option: 'ckan.datapusher.url', value: 'http://127.0.0.1:8800', state: 'present' }
- { section: 'app:main', option: 'ckan.datapusher.formats', value: 'csv xls xlsx tsv application/csv application/vnd.ms-excel application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', state: 'present' }
- { section: 'app:main', option: 'ckan.storage_path', value: '{{ ckan_file_storage_dir }}', state: 'present' }
- { section: 'app:main', option: 'ckan.max_resource_size', value: '10', state: 'present' }
- { section: 'app:main', option: 'ckan.max_image_size', value: '2', state: 'present' }
- { section: 'app:main', option: 'ckan.harvest.mq.type', value: 'redis', state: 'present' }
- { section: 'app:main', option: 'ckan.harvest.mq.hostname', value: 'localhost', state: 'present' }
- { section: 'app:main', option: 'ckan.harvest.mq.port', value: '6379', state: 'present' }
- { section: 'app:main', option: 'ckan.harvest.mq.db', value: '0', state: 'present' }
- { section: 'app:main', option: 'ckanext.spatial.search_backend', value: 'solr', state: 'present' }
- { section: 'app:main', option: 'ckan.tracking_enabled', value: 'true', state: 'present' }
- { section: 'app:main', option: 'ckan.privatedatasets.show_acquire_url_on_create', value: 'true', state: 'present' }
- { section: 'app:main', option: 'ckan.privatedatasets.show_acquire_url_on_edit', value: 'true', state: 'present' }
- { section: 'app:main', option: 'ckanext.pages.organization', value: 'true', state: 'present' }
- { section: 'app:main', option: 'ckanext.pages.group', value: 'true', state: 'present' }
- { section: 'app:main', option: 'ckanext.pages.about_menu', value: 'false', state: 'absent' }

View File

@ -0,0 +1,7 @@
---
- name: Configure the CKAN plugins list into the configuration file
ini_file: dest={{ ckan_config_file }} section={{ item.section }} option={{ item.option }} value={{ item.value }} state={{ item.state }} backup=yes
with_items: '{{ ckan_production_ini_plugins_opts }}'
notify: Restart CKAN
tags: [ 'ckan', 'ckan_ini', 'ckan_plugins' ]

View File

@ -8,7 +8,7 @@
register: ckan_install
tags: ckan
- name: Configure the CKAN production configuration file
- name: Configure the CKAN production configuration file but the plugins list
ini_file: dest={{ ckan_config_file }} section={{ item.section }} option={{ item.option }} value={{ item.value }} state={{ item.state }} backup=yes
with_items: '{{ ckan_production_ini_opts }}'
notify: Restart CKAN

View File

@ -1,5 +1,6 @@
---
- include: ckan.yml
- include: ckan-plugins.yml
- include: ckan-config.yml
- include: enable-ckan.yml
- include: supervisor.yml