Skip to content

Commit

Permalink
Merge pull request #104 from IQSS/dataverse-6142-solr-schema-changes
Browse files Browse the repository at this point in the history
Dataverse 6142 solr schema changes
  • Loading branch information
pdurbin authored Sep 23, 2019
2 parents be0b2ae + 1c46ef6 commit 81ce8d5
Showing 1 changed file with 30 additions and 37 deletions.
67 changes: 30 additions & 37 deletions tasks/dataverse-solr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,47 +55,40 @@
- name: clean up solr distro files
file: path="/tmp/solr-{{ dataverse.solr.version }}" state=absent

# ----- solr schema.xml ------------------------------------------
#- name: place release solr schema
# get_url:
# url: "https://github.com/IQSS/dataverse/releases/download/v4.15/schema.xml"
# dest: "{{ dataverse.solr.root }}/server/solr/collection1/conf/"
# owner: "{{ dataverse.solr.user }}"
# group: "{{ dataverse.solr.group }}"
# mode: 0644
# when: dataverse_branch == "release"

- name: place release solr schema
- name: "release: place solr schema"
copy:
src: "/tmp/dvinstall/schema.xml"
dest: "{{ dataverse.solr.root }}/server/solr/collection1/conf/"
owner: "{{ dataverse.solr.user }}"
group: "{{ dataverse.solr.group }}"
mode: 0644
remote_src: yes
src: "/tmp/dvinstall/schema.xml"
dest: "{{ dataverse.solr.root }}/server/solr/collection1/conf/"
owner: "{{ dataverse.solr.user }}"
group: "{{ dataverse.solr.group }}"
mode: 0644
remote_src: yes
when: dataverse_branch == "release"

- name: place branch solr schema
copy:
src: "{{ dataverse.srcdir }}/conf/solr/{{ dataverse.solr.version }}/schema.xml"
dest: "{{ dataverse.solr.root }}/server/solr/collection1/conf/"
owner: "{{ dataverse.solr.user }}"
group: "{{ dataverse.solr.group }}"
mode: 0644
remote_src: yes
- name: "branch: identify solr schema files"
find:
paths: '{{ dataverse.srcdir }}/conf/solr/'
file_type: file
use_regex: yes
recurse: yes
patterns: 'schema*'
register: solr_files
when: dataverse_branch != "release"

# ----- solrconfig.xml -------------------------------------------
#- name: get solrconfig
# get_url:
# url: "https://github.com/IQSS/dataverse/releases/download/v4.10/solrconfig.xml"
# dest: "{{ dataverse.solr.root }}/server/solr/collection1/conf/"
# owner: "{{ dataverse.solr.user }}"
# group: "{{ dataverse.solr.group }}"
# mode: 0644
# when: dataverse_branch == "release"

- name: place release solrconfig
- name: "branch: place solr schema files"
copy:
src: '{{ item }}'
dest: '{{ dataverse.solr.root }}/server/solr/collection1/conf'
owner: '{{ dataverse.solr.user }}'
group: '{{ dataverse.solr.group }}'
mode: 0644
remote_src: yes
with_items:
- "{{ solr_files.files | map(attribute='path') | list }}"
when: dataverse_branch != "release" and
solr_files > 0

- name: "release: place solrconfig"
copy:
src: "/tmp/dvinstall/solrconfig.xml"
dest: "{{ dataverse.solr.root }}/server/solr/collection1/conf/"
Expand All @@ -105,7 +98,7 @@
remote_src: yes
when: dataverse_branch == "release"

- name: copy branch solrconfig.xml
- name: "branch: place solrconfig"
copy:
src: "{{ dataverse.srcdir }}/conf/solr/{{ dataverse.solr.version }}/solrconfig.xml"
dest: "{{ dataverse.solr.root }}/server/solr/collection1/conf/"
Expand Down

0 comments on commit 81ce8d5

Please sign in to comment.