We want the Solr home directory to be moved in /home/solr/

This commit is contained in:
Tristan PILAT 2019-07-04 12:37:09 +02:00 committed by Patrick Marchand
parent 19962e2ac9
commit 6e64e6498f

View file

@ -17,3 +17,21 @@
- name: "Install Solr {{ solr_version }}"
command: "lxc-attach -n {{name}} -- /root/solr-{{ solr_version }}/bin/install_solr_service.sh /root/solr-{{ solr_version }}.tgz"
- name: "Stop Solr"
command: "lxc-attach -n {{name}} -- /etc/init.d/solr stop"
ignore_errors: True
- name: "Make sure /home/solr exists"
file:
path: /home/solr
state: directory
mode: '0755'
- name: "Move Solr data directory to /home/solr/{{name}}"
command: "lxc-attach -n {{name}} -- mv /var/solr /home/solr/{{name}}"
- name: "Create a symbolic link to /home/solr/{{name}}"
command: "lxc-attach -n {{name}} -- ln -s /home/solr/{{name}} /var/solr"
- name: "Start Solr"
command: "lxc-attach -n {{name}} -- /etc/init.d/solr start"