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' ]
|
tags: [ 'pg_backup', 'postgresql', 'postgres' ]
|
||||||
|
|
||||||
- name: Initialize the CKAN databases
|
- 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 }}
|
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
|
||||||
when: ( ckan_install | changed )
|
args:
|
||||||
|
creates: '{{ ckan_libdir }}/.ckan_db_initialized'
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
tags: ckan
|
tags: ckan
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue