12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- ---
- # Installs and configures the Solr full-text-search.
-
- - name: Install Solr and related packages
- apt:
- name: "{{ packages }}"
- state: present
- vars:
- packages:
- - dovecot-solr
- - solr-tomcat
- tags:
- - dependencies
- when: ansible_distribution_version == '9'
-
- - name: Install Solr and related packages
- apt:
- name: "{{ packages }}"
- state: present
- vars:
- packages:
- - dovecot-solr
- - solr-tomcat
- tags:
- - dependencies
- when: ansible_distribution_version == '10'
-
- - name: Work around Debian bug and copy Solr schema file into place
- copy:
- src=solr-schema.xml
- dest=/etc/solr/conf/schema.xml
- owner=root
- group=root
- when: ansible_distribution_version != '11'
-
- - name: Copy tweaked Tomcat config file into place
- copy:
- src=etc_tomcat8_server.xml
- dest=/etc/tomcat8/server.xml
- owner=root
- group=tomcat8
- notify: restart solr
- when: ansible_distribution_version == '9'
-
- - name: Copy tweaked Tomcat config file into place
- copy:
- src=etc_tomcat9_server.xml
- dest=/etc/tomcat9/server.xml
- owner=root
- group=tomcat
- notify: restart solr
- when: ansible_distribution_version == '10'
-
- - name: Copy tweaked Solr config file into place
- copy:
- src=etc_solr_conf_solrconfig.xml
- dest=/etc/solr/conf/solrconfig.xml
- owner=root
- group=root
- notify: restart solr
- when: ansible_distribution_version != '11'
-
- - name: Create Solr index directory
- file:
- state=directory
- path=/data/solr
- owner=tomcat8
- group=tomcat8
- notify: restart solr
- when: ansible_distribution_version == '9'
-
- - name: Create Solr index directory
- file:
- state=directory
- path=/data/solr
- owner=tomcat
- group=tomcat
- notify: restart solr
- when: ansible_distribution_version == '10'
|