forked from ISTI-ansible-roles/ansible-roles
Fixes to the ckan roles, mostly related to the use of the 'become' directive.
This commit is contained in:
parent
0e3d2f85d6
commit
6a57323aa7
|
@ -9,7 +9,7 @@
|
|||
tags: [ 'ckan', 'ckan_sessions', 'ckan_memcache' ]
|
||||
|
||||
- block:
|
||||
- name: Install the memcache library
|
||||
- name: Install the memcache library deb package
|
||||
apt: pkg=libmemcached10 state=present update_cache=yes cache_valid_time=1800
|
||||
|
||||
- name: Configure CKAN so that it uses memcache for its sessions
|
||||
|
@ -27,7 +27,6 @@
|
|||
file: dest=/tmp/{{ ckan_site_id }}/sessions state=absent
|
||||
ignore_errors: True
|
||||
|
||||
become: False
|
||||
when: ckan_memcache_sessions is defined and ckan_memcache_sessions
|
||||
tags: [ 'ckan', 'ckan_sessions', 'ckan_memcache' ]
|
||||
|
||||
|
@ -40,7 +39,6 @@
|
|||
- Restart fetch and gather consumers
|
||||
tags: [ 'ckan', 'ckan_ini', 'ckan_plugins', 'ckan_sessions', 'ckan_memcache' ]
|
||||
|
||||
become: False
|
||||
when:
|
||||
- ckan_memcache_sessions is defined
|
||||
- not ckan_memcache_sessions
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
---
|
||||
- block:
|
||||
- name: Install some packages dependencies
|
||||
apt: name={{ item }} state=latest update_cache=yes cache_valid_time=3600
|
||||
with_items: '{{ ckan_additional_packages }}'
|
||||
apt: name={{ ckan_additional_packages }} state=latest update_cache=yes cache_valid_time=3600
|
||||
|
||||
become: False
|
||||
tags: [ 'ckan', 'geonetwork', 'ckan_plugins', 'ckan_pip_deps' ]
|
||||
|
||||
- block:
|
||||
|
@ -14,8 +12,7 @@
|
|||
tags: [ 'ckan', 'geonetwork', 'ckan_plugins', 'ckan_pip_deps' ]
|
||||
|
||||
- name: Install some python plugins dependencies inside the CKAN virtualenv
|
||||
pip: name={{ item }} virtualenv={{ ckan_virtenv }} state=present
|
||||
with_items: '{{ ckan_pip_dependencies }}'
|
||||
pip: name={{ ckan_pip_dependencies }} virtualenv={{ ckan_virtenv }} state=present
|
||||
tags: [ 'ckan', 'geonetwork', 'ckan_plugins', 'ckan_pip_deps' ]
|
||||
|
||||
- name: Download the CKAN ckanext-harvest plugin
|
||||
|
@ -57,7 +54,7 @@
|
|||
tags: [ 'ckan', 'ckan_spatial', 'ckan_plugins' ]
|
||||
|
||||
- name: Download the CKAN ckanext-geoview plugin
|
||||
pip: name='{{ ckan_geoview_url }}' virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }} editable=True
|
||||
pip: name='{{ ckan_geoview_url }}' virtualenv={{ ckan_virtenv }} state={{ ckan_plugins_state }}
|
||||
notify: Restart CKAN
|
||||
when: ckan_geoview
|
||||
tags: [ 'ckan', 'ckan_geoview', 'ckan_plugins' ]
|
||||
|
@ -190,7 +187,7 @@
|
|||
tags: [ 'ckan', 'ckan_profiler', 'ckan_plugins' ]
|
||||
|
||||
- name: Create the profiler plugin log directory
|
||||
become: False
|
||||
become_user: root
|
||||
file: dest=/var/log/ckan-profiler owner=www-data group=www-data state=directory
|
||||
when: ckan_profiler
|
||||
tags: [ 'ckan', 'ckan_profiler', 'ckan_plugins' ]
|
||||
|
|
|
@ -8,6 +8,10 @@
|
|||
register: ckan_install
|
||||
tags: ckan
|
||||
|
||||
- name: Create the CKAN user
|
||||
user: name={{ ckan_shell_user }} home={{ ckan_libdir }} createhome=no shell=/usr/sbin/nologin system=yes
|
||||
tags: ckan
|
||||
|
||||
- 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 }}'
|
||||
|
|
Loading…
Reference in New Issue