-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
separate solr tasks so it can be deployed to its own server (#126)
* separate solr tasks so it can be deployed to its own server * update ansible_ssh_host -> ansible_host
- Loading branch information
Showing
4 changed files
with
44 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,6 @@ solr_cores: | |
- CLAW | ||
|
||
solr_install_path: /opt/solr | ||
|
||
solr_user: solr | ||
solr_instance_conf_path: /var/solr/data/CLAW/conf |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,16 @@ | ||
--- | ||
|
||
|
||
# Only tasks related to configuring search_api_solr are put here | ||
# Solr server configuration should go into the solr playbook: https://github.com/Islandora-Devops/claw-playbook/blob/dev/solr.yml | ||
|
||
- name: Set default solr server host from hostvars | ||
command: "{{ drush_path }} --root {{ drupal_core_path }} -y config-set search_api.server.default_solr_server backend_config.connector_config.host {{ hostvars[groups['solr'][0]].ansible_host }}" | ||
register: set_search_api_config_host | ||
changed_when: "'Do you want to update' in set_search_api_config.stdout" | ||
|
||
- name: Set default solr server to point to CLAW core | ||
command: "{{ drush_path }} --root {{ drupal_core_path }} -y config-set search_api.server.default_solr_server backend_config.connector_config.core CLAW" | ||
register: set_search_api_config | ||
register: set_search_api_config_core | ||
changed_when: "'Do you want to update' in set_search_api_config.stdout" | ||
|
||
- name: Get solr config files to copy | ||
command: "find {{ webserver_document_root }}/drupal/web/modules/contrib/search_api_solr/solr-conf/7.x -type f" | ||
register: files_to_copy | ||
changed_when: false | ||
|
||
- name: Copy solr config files | ||
copy: | ||
src: "{{ item }}" | ||
dest: "{{ solr_instance_conf_path }}" | ||
owner: "{{ solr_user }}" | ||
group: "{{ solr_user }}" | ||
remote_src: True | ||
with_items: | ||
- "{{ files_to_copy.stdout_lines }}" | ||
|
||
# https://www.drupal.org/project/search_api_solr/issues/3015993 | ||
- name: Set solr_install_path in solrcore.properties | ||
lineinfile: | ||
path: /var/solr/data/CLAW/conf/solrcore.properties | ||
regexp: '^solr\.install\.dir=.*$' | ||
line: solr.install.dir={{ solr_install_path }} | ||
state: present | ||
notify: restart solr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters