diff --git a/library/roles/solr-tomcat-core-conf/defaults/main.yml b/library/roles/solr-tomcat-core-conf/defaults/main.yml index ca445377..11416223 100644 --- a/library/roles/solr-tomcat-core-conf/defaults/main.yml +++ b/library/roles/solr-tomcat-core-conf/defaults/main.yml @@ -1,7 +1,6 @@ --- solr_http_port: 8983 tomcat_load_additional_default_conf: True -tomcat_version: 7 # solr needs a lot of time to start if it needs to rebuild its indices tomcat_restart_timeout: 100000 diff --git a/library/roles/solr-tomcat-core-conf/tasks/main.yml b/library/roles/solr-tomcat-core-conf/tasks/main.yml index bc828ef5..ad720603 100644 --- a/library/roles/solr-tomcat-core-conf/tasks/main.yml +++ b/library/roles/solr-tomcat-core-conf/tasks/main.yml @@ -1,4 +1,26 @@ --- +- name: Set the tomcat version for ubuntu Trusy + set_fact: + tomcat_version: 7 + when: + - ansible_distribution_major_version <= '16' + - tomcat_fixed_version is not defined + tags: [ solr, tomcat, solr_core ] + +- name: Set the tomcat version for Ubuntu bionic + set_fact: + tomcat_version: 8 + when: + - ansible_distribution_major_version == '18' + - tomcat_fixed_version is not defined + tags: [ solr, tomcat, solr_core ] + +- name: Impose a tomcat version + set_fact: + tomcat_version: '{{ tomcat_fixed_version }}' + when: tomcat_fixed_version is defined + tags: [ solr, tomcat, solr_core ] + - block: - name: Create the solr cores data directories file: dest={{ solr_collections_base_dir }}/{{ item }} state=directory owner={{ solr_user }} group={{ solr_user }}