-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
60 additions
and
9 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
51 changes: 51 additions & 0 deletions
51
provisioning/roles/geerlingguy.solr-cleanup/tasks/cores.yml
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
|
||
- name: Solr | Create core directories | ||
file: | ||
path: "/var/solr/{{ item.name }}" | ||
state: directory | ||
owner: solr | ||
group: solr | ||
with_items: "{{ solr_cores }}" | ||
|
||
- name: Solr | Create data directories | ||
file: | ||
path: "/var/solr/{{ item.name }}/data" | ||
state: directory | ||
owner: solr | ||
group: solr | ||
with_items: "{{ solr_cores }}" | ||
|
||
- name: Solr | Create core.properties | ||
template: | ||
src: core.properties.j2 | ||
dest: "/var/solr/{{ item.name }}/core.properties" | ||
owner: solr | ||
group: solr | ||
with_items: "{{ solr_cores }}" | ||
|
||
- name: Solr | Download Drupal Solr configuration | ||
get_url: | ||
url: "https://ftp.drupal.org/files/projects/{{ item.module }}.tar.gz" | ||
dest: "/var/solr/{{ item.name }}/{{ item.module }}.tar.gz" | ||
with_items: "{{ solr_cores }}" | ||
|
||
- name: Solr | Unarchive Drupal Solr configuration | ||
unarchive: | ||
remote_src: yes | ||
src: "/var/solr/{{ item.name }}/{{ item.module }}.tar.gz" | ||
dest: "/var/solr/{{ item.name }}/" | ||
with_items: "{{ solr_cores }}" | ||
|
||
- name: Solr | Copy Drupal Solr conf directory into place | ||
command: "cp -r /var/solr/{{ item.name }}/search_api_solr/{{ item.subdir }} /var/solr/{{ item.name }}/conf" | ||
with_items: "{{ solr_cores }}" | ||
|
||
- name: Solr | Chmod Solr conf directory | ||
file: | ||
path: "/var/solr/{{ item.name }}/conf" | ||
state: directory | ||
owner: solr | ||
group: solr | ||
recurse: yes | ||
with_items: "{{ solr_cores }}" |
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
1 change: 1 addition & 0 deletions
1
provisioning/roles/geerlingguy.solr-cleanup/templates/core.properties.j2
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
name={{ item.name }} |