From f470d6a868fd90b4e1d2e3137229243fe2a4aed3 Mon Sep 17 00:00:00 2001 From: Kai Weber Date: Mon, 2 Oct 2023 16:39:56 +0200 Subject: [PATCH] Adjust path for default cores in Solr 9 --- defaults/main.yml | 2 ++ tasks/cores.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 72aed12..6677c34 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -29,6 +29,8 @@ solr_opts: "$SOLR_OPTS -Dlog4j2.formatMsgNoLookups=true" solr_cores: - collection1 +solr_default_core_path: "{% if solr_version.split('.')[0] < '9' %}{{ solr_install_path }}/example/files/conf/{% else %}{{ solr_install_path }}/server/solr/configsets/_default/conf/{% endif %}" + solr_config_file: /etc/default/{{ solr_service_name }}.in.sh # Enable restart solr handler diff --git a/tasks/cores.yml b/tasks/cores.yml index aead23c..a749690 100644 --- a/tasks/cores.yml +++ b/tasks/cores.yml @@ -18,7 +18,7 @@ with_items: "{{ solr_cores }}" - name: Ensure core configuration directories exist. - command: "cp -r {{ solr_install_path }}/example/files/conf/ {{ solr_home }}/data/{{ item }}/" + command: "cp -r {{ solr_default_core_path }} {{ solr_home }}/data/{{ item }}/" when: "item not in solr_cores_current.content" with_items: "{{ solr_cores }}" become: true