From 0e3d2f85d6ef92e329f81d1d931a60acf3ec5d47 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 11 Apr 2019 19:05:03 +0200 Subject: [PATCH] Fix the tomcat solr tasks. --- solr-tomcat-instance/defaults/main.yml | 10 ++++++++++ solr-tomcat-instance/tasks/main.yml | 11 ++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/solr-tomcat-instance/defaults/main.yml b/solr-tomcat-instance/defaults/main.yml index cc7eb1f..5ae54a9 100644 --- a/solr-tomcat-instance/defaults/main.yml +++ b/solr-tomcat-instance/defaults/main.yml @@ -37,3 +37,13 @@ solr_multicore: False solr_cores: - collection1 +solr_additional_packages: + - libslf4j-java + - libcommons-logging-java + +solr_data_subdirs: + - data/solr + - webapps + - zoo_data + - collection_data + - conf/Catalina/localhost diff --git a/solr-tomcat-instance/tasks/main.yml b/solr-tomcat-instance/tasks/main.yml index 668e28e..e40f4ae 100644 --- a/solr-tomcat-instance/tasks/main.yml +++ b/solr-tomcat-instance/tasks/main.yml @@ -1,11 +1,7 @@ --- - name: Ensure that the solr data directory exists file: path={{ solr_data_dir }}/{{ item }} state=directory mode=0775 owner={{ solr_user }} group={{ solr_user }} - with_items: - - data/solr - - webapps - - zoo_data - - collection_data + with_items: '{{ solr_data_subdirs }}' tags: solr - name: Create the link from the tomcat instance for solr to the solr data directory @@ -14,10 +10,7 @@ tags: solr - name: Solr needs some additional packages - apt: pkg={{ item }} state={{ pkg_state }} - with_items: - - libslf4j-java - - libcommons-logging-java + apt: pkg={{ solr_additional_packages }} state={{ pkg_state }} tags: [ solr, tomcat ] - name: Let the additional packages jar files visible to tomcat