forked from ISTI-ansible-roles/ansible-roles
library/roles/ckan/ckan/tasks/ckan.yml: Change strategy to decide if the DB needs to be initialized.
This commit is contained in:
parent
42208fcfb0
commit
58aa726c57
|
@ -33,8 +33,9 @@
|
|||
tags: [ 'pg_backup', 'postgresql', 'postgres' ]
|
||||
|
||||
- name: Initialize the CKAN databases
|
||||
shell: ckan db init ; ckan datastore set-permissions | psql --set ON_ERROR_STOP=1 -h {{ psql_db_host }} -U {{ ckan_db_user }} -w {{ ckan_datastore_db_name }}
|
||||
when: ( ckan_install | changed )
|
||||
shell: ckan db init ; 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_db_initialized
|
||||
args:
|
||||
creates: '{{ ckan_libdir }}/.ckan_db_initialized'
|
||||
ignore_errors: True
|
||||
tags: ckan
|
||||
|
||||
|
|
Loading…
Reference in New Issue