Fix issues with systemd service

This commit is contained in:
Maarten Bezemer 2016-11-03 14:53:45 +01:00
parent 56837b0627
commit dd7623fffe
4 changed files with 9 additions and 13 deletions

View file

@ -42,7 +42,9 @@
- name: Copy Systemd File for Instance
template: src=systemd/elasticsearch.j2 dest={{instance_sysd_script}} mode=0644 force=yes
when: use_system_d
notify: restart elasticsearch
notify:
- reload systemd configuration
- restart elasticsearch
#Copy the logging.yml
- name: Copy Logging.yml File for Instance
@ -63,7 +65,7 @@
when: ansible_os_family == 'RedHat'
- name: Delete Default Sysconfig File
file: dest=/usr/lib/systemd/system/elasticsearch.service state=absent
file: dest="{{ sysd_script }}" state=absent
- name: Delete Default Configuration File
file: dest=/etc/elasticsearch/elasticsearch.yml state=absent

View file

@ -1,6 +0,0 @@
# Make sure the service is started, and restart if necessary
- name: Start elasticsearch service
service: name={{instance_init_script | basename}} state=started enabled=yes
when: es_start_service
register: elasticsearch_started

View file

@ -31,9 +31,6 @@
- include: xpack/elasticsearch-xpack.yml
tags:
- xpack
- include: elasticsearch-service.yml
tags:
- service
- include: elasticsearch-templates.yml
when: es_templates
tags: