Skip to content

Commit

Permalink
Add tasks to clear and rebuild Solr index in ckan_config_ckanext.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mjanez committed Nov 14, 2024
1 parent 0d40a16 commit c1c3232
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion playbook/roles/ckan/tasks/ckan_config_ckanext.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,16 @@
regexp: "^ckanext.xloader.api_token =.*"
line: "ckanext.xloader.api_token = {{ xloader_api_token }}"
become: true
when: xloader_api_token is defined and xloader_api_token != ""
when: xloader_api_token is defined and xloader_api_token != ""

# Clear index
- name: Clear Solr index
shell: |
{{ ckan_virtualenv }}/bin/ckan -c {{ ckan_config_dir }}/ckan.ini search-index clear
become: true

# Rebuild index
- name: Rebuild Solr index
shell: |
{{ ckan_virtualenv }}/bin/ckan -c {{ ckan_config_dir }}/ckan.ini search-index rebuild
become: true

0 comments on commit c1c3232

Please sign in to comment.