Systemd temp path for Debian 8
This commit is contained in:
parent
b750bb8759
commit
6c4289b2df
2 changed files with 5 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue