forked from ISTI-ansible-roles/ansible-roles
96 lines
5.6 KiB
YAML
96 lines
5.6 KiB
YAML
---
|
|
# To create the first sysadmin user:
|
|
# . /usr/lib/ckan/default/bin/activate
|
|
# cd /usr/lib/ckan/default/src/ckan
|
|
# You have to create your first CKAN sysadmin user from the command line. For example, to create a user called seanh and make him a # sysadmin:
|
|
|
|
# paster sysadmin add seanh -c /etc/ckan/default/production.ini
|
|
#
|
|
# To create some test data:
|
|
# paster create-test-data -c /etc/ckan/default/production.ini
|
|
|
|
ckan_version: 2.5
|
|
ckan_deb_file: 'python-ckan_{{ ckan_version }}-{{ ansible_distribution_release }}_amd64.deb'
|
|
ckan_package_url: 'http://packaging.ckan.org/{{ ckan_deb_file }}'
|
|
ckan_libdir: /usr/lib/ckan
|
|
ckan_virtenv: '{{ ckan_libdir }}/default'
|
|
ckan_file_storage_dir: /var/lib/ckan/dev
|
|
ckan_config_file: /etc/ckan/default/production.ini
|
|
ckan_solr_port: 8983
|
|
ckan_shell_user: ckan
|
|
|
|
# The order is important
|
|
ckan_geonetwork_harvester: True
|
|
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'
|
|
ckan_geonetwork_harvester_url: 'https://github.com/geosolutions-it/ckanext-geonetwork.git'
|
|
ckan_pdfview: False
|
|
ckan_ckanext_pdfview_url: ckanext-pdfview
|
|
ckan_privatedatasets: False
|
|
ckan_privatedatasets_url: ckanext-privatedatasets
|
|
ckan_privatedatasets_name: privatedatasets
|
|
ckan_hierarchy: False
|
|
ckan_hierarchy_url: 'git+https://github.com/datagovuk/ckanext-hierarchy.git#egg=ckanext-hierarchy'
|
|
ckan_hierarchy_name: hierarchy_display hierarchy_form
|
|
ckan_pages: False
|
|
ckan_pages_url: 'git+https://github.com/ckan/ckanext-pages.git#egg=ckanext-pages'
|
|
ckan_pages_name: pages
|
|
|
|
users_system_users:
|
|
- { login: '{{ ckan_shell_user }}', name: "CKAN user", home: '/usr/lib', createhome: 'no', ssh_key: '{{ francesco_mangiacrapa }}', shell: '/bin/bash', admin: False, log_as_root: True }
|
|
|
|
|
|
# Needed to install some CKAN plugins
|
|
additional_packages:
|
|
- git
|
|
- libxslt1-dev
|
|
- gcc
|
|
- python-dev
|
|
- libxml2-dev
|
|
- zlib1g-dev
|
|
- libxslt1-dev
|
|
- libgeos-c1
|
|
- python-ldap
|
|
|
|
ckan_pip_dependencies:
|
|
- lxml
|
|
- factory
|
|
#
|
|
apache_additional_packages:
|
|
- libapache2-mod-uwsgi
|
|
- libpq5
|
|
|
|
apache_additional_modules:
|
|
- uwsgi
|
|
|
|
ckan_production_ini_opts:
|
|
- { section: 'app:main', option: 'ckan.site_id', value: 'd4s_dev', 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://ckan-d-d4s.d4science.org', 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 ckan_harvester spatial_metadata spatial_query csw_harvester waf_harvester doc_harvester geonetwork_harvester pdf_view {{ ckan_privatedatasets_name }} {{ ckan_hierarchy_name }} {{ ckan_pages_name }}', 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.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' }
|
|
- { section: 'app:main', option: 'ckanext.pages.group_menu', value: 'false', state: 'absent' }
|
|
- { section: 'app:main', option: 'ckanext.pages.organization_menu', value: 'false', state: 'absent' }
|
|
|