mirror of
https://github.com/aljazceru/ansible-elasticsearch.git
synced 2025-12-17 17:14:20 +01:00
Systemd temp path for Debian 8
This commit is contained in:
@@ -167,6 +167,6 @@ Following variables affect the versions installed:
|
||||
|
||||
* The role assumes the user/group exists on the server. The elasticsearch packages create the default elasticsearch user. If this needs to be changed, ensure the user exists.
|
||||
* The playbook relies on the inventory_name of each host to ensure its directories are unique
|
||||
* Systemd scripts are by default installed in addition to init scripts. This is pending improvement and currently relies on the user to determine the prefered mechanism.
|
||||
* Systemd scripts are by default installed in addition to init scripts - with the exception of Debian 8. This is pending improvement and currently relies on the user to determine the preferred mechanism.
|
||||
* Changing an instance_name for a role application will result in the installation of a new component. The previous component will remain.
|
||||
* KitchenCI has been used for testing. This is used to confirm images reach the correct state after a play is first applied.
|
||||
|
||||
@@ -6,8 +6,10 @@
|
||||
- stat: path={{sysd_script}}
|
||||
register: systemd_service
|
||||
|
||||
- set_fact: use_system_d={{systemd_service.stat.exists and (ansible_os_family == 'RedHat' or ansible_distribution_version | version_compare('8', '<'))}}
|
||||
|
||||
- set_fact: instance_sysd_script={{sysd_script | dirname }}/{{es_instance_name}}_{{sysd_script | basename}}
|
||||
when: systemd_service.stat.exists
|
||||
when: use_system_d
|
||||
|
||||
#For directories we also use the {{inventory_hostname}}-{{ es_instance_name }} - this helps if we have a shared SAN.
|
||||
|
||||
@@ -58,7 +60,7 @@
|
||||
#Copy the systemd specific file if systemd is installed
|
||||
- name: Copy Systemd File for Instance
|
||||
template: src=systemd/elasticsearch.j2 dest={{instance_sysd_script}} mode=0644 force=yes
|
||||
when: systemd_service.stat.exists
|
||||
when: use_system_d
|
||||
notify: restart elasticsearch
|
||||
|
||||
#Copy the logging.yml
|
||||
|
||||
Reference in New Issue
Block a user