-
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.
Merge pull request #6 from ymcatwincities/solr_init
Add local and build solr support
- Loading branch information
Showing
4 changed files
with
105 additions
and
36 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
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
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,45 @@ | ||
--- | ||
- name: Remove build collection directory | ||
file: | ||
state: absent | ||
path: "{{ solr_conf_path }}/{{ mysql_db }}" | ||
mode: 0755 | ||
|
||
- name: Create build collection directory | ||
file: | ||
state: directory | ||
path: "{{ solr_conf_path }}/{{ mysql_db }}" | ||
mode: 0755 | ||
|
||
- name: Copy default collection to unique build collection directory | ||
synchronize: | ||
src: "{{ default_solr_collection_path }}/" | ||
dest: "{{ solr_conf_path }}/{{ mysql_db }}" | ||
delegate_to: "{{ inventory_hostname }}" | ||
|
||
|
||
- name: Copy solr config from search_api_solr to unique build collection directory | ||
synchronize: | ||
src: "{{ solr_module_config_path }}/" | ||
dest: "{{ solr_conf_path }}/{{ mysql_db }}/conf" | ||
delegate_to: "{{ inventory_hostname }}" | ||
|
||
- name: Set ownership for build collection directory | ||
file: | ||
state: directory | ||
path: "{{ solr_conf_path }}/{{ mysql_db }}" | ||
mode: 0755 | ||
owner: solr | ||
group: solr | ||
recurse: yes | ||
|
||
- name: Changing name of the solr collection within build directory | ||
lineinfile: | ||
dest: "{{ solr_conf_path }}/{{ mysql_db }}/core.properties" | ||
regexp: '^name=' | ||
line: "name={{ mysql_db }}" | ||
|
||
- name: Restart jetty solr | ||
service: | ||
state: restarted | ||
name: jetty |
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