diff --git a/ckan/ckan/tasks/ckan.yml b/ckan/ckan/tasks/ckan.yml index 3f0e6440..3e37110b 100644 --- a/ckan/ckan/tasks/ckan.yml +++ b/ckan/ckan/tasks/ckan.yml @@ -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