Systemd temp path for Debian 8

This commit is contained in:
Dale McDiarmid 2015-11-27 21:43:49 +00:00
parent b750bb8759
commit 6c4289b2df
2 changed files with 5 additions and 3 deletions

View file

@ -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 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 * 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. * 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. * KitchenCI has been used for testing. This is used to confirm images reach the correct state after a play is first applied.

View file

@ -6,8 +6,10 @@
- stat: path={{sysd_script}} - stat: path={{sysd_script}}
register: systemd_service 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}} - 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. #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 #Copy the systemd specific file if systemd is installed
- name: Copy Systemd File for Instance - name: Copy Systemd File for Instance
template: src=systemd/elasticsearch.j2 dest={{instance_sysd_script}} mode=0644 force=yes 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 notify: restart elasticsearch
#Copy the logging.yml #Copy the logging.yml