This repository has been archived by the owner on Dec 1, 2020. It is now read-only.
forked from Islandora-Devops/islandora-playbook
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsolr.yml
68 lines (61 loc) · 1.85 KB
/
solr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
- hosts: solr
become: yes
any_errors_fatal: true
roles:
- role: geerlingguy.java
when: "ansible_os_family == 'Debian'"
java_packages:
- openjdk-8-jdk
- role: geerlingguy.java
when: "ansible_os_family == 'RedHat'"
java_packages:
- java-1.8.0-openjdk
- geerlingguy.solr
tasks:
- name: Unarchive solr config
unarchive:
src: "https://ftp.drupal.org/files/projects/search_api_solr-8.x-2.0.zip"
dest: /tmp
remote_src: yes
register: solr_config_download_and_extract
until: solr_config_download_and_extract is not failed
retries: 5
tags: solr
- name: Get solr config files to copy
command: "find /tmp/search_api_solr/solr-conf/7.x -type f"
register: files_to_copy
changed_when: false
until: files_to_copy is not failed
retries: 5
tags: solr
- 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 }}"
tags: solr
# https://www.drupal.org/project/search_api_solr/issues/3015993
- name: Set solr_install_path in solrcore.properties
lineinfile:
path: "{{ solr_instance_conf_path }}/solrcore.properties"
regexp: '^solr\.install\.dir=.*$'
line: solr.install.dir={{ solr_install_path }}
state: present
notify: restart solr
tags: solr
- name: Fetch a Solr query to warm up the application
uri:
url: http://localhost:8983/solr/ISLANDORA/select?q=warm
method: GET
return_content: yes
status_code: [200,412]
register: solr_webpage
until: solr_webpage.status == 200
retries: 20
delay: 3
tags: solr