Move restart to main from handler
This commit is contained in:
parent
7b32a17d59
commit
914cb7867c
5 changed files with 7 additions and 11 deletions
|
|
@ -1,8 +0,0 @@
|
||||||
---
|
|
||||||
|
|
||||||
- name: Restart Elasticsearch
|
|
||||||
service: name={{instance_init_script | basename}} state=restarted enabled=yes
|
|
||||||
when: es_restart_on_change and es_start_service and ((plugin_installed is defined and plugin_installed.changed) or (config_updated is defined and config_updated.changed) or (xpack_state.changed) or (debian_elasticsearch_install_from_repo.changed or redhat_elasticsearch_install_from_repo.changed or elasticsearch_install_from_package.changed))
|
|
||||||
|
|
||||||
- name: Wait for elasticsearch to startup
|
|
||||||
wait_for: host={{es_api_host}} port={{es_api_port}} delay=5 connect_timeout=1
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
|
|
||||||
# Restart service and ensure it is enabled
|
# Restart service and ensure it is enabled
|
||||||
- name: restart elasticsearch
|
- name: restart elasticsearch
|
||||||
include: ./handlers/elasticsearch-restart.yml
|
service: name={{instance_init_script | basename}} state=restarted enabled=yes
|
||||||
|
when: es_restart_on_change and es_start_service and ((plugin_installed is defined and plugin_installed.changed) or (config_updated is defined and config_updated.changed) or (xpack_state.changed) or (debian_elasticsearch_install_from_repo.changed or redhat_elasticsearch_install_from_repo.changed or elasticsearch_install_from_package.changed))
|
||||||
|
|
||||||
# All security specific actions should go in here
|
# All security specific actions should go in here
|
||||||
- name: activate-security
|
- name: activate-security
|
||||||
|
|
|
||||||
|
|
@ -41,4 +41,8 @@
|
||||||
when: es_templates
|
when: es_templates
|
||||||
tags:
|
tags:
|
||||||
- templates
|
- templates
|
||||||
|
|
||||||
- meta: flush_handlers
|
- meta: flush_handlers
|
||||||
|
|
||||||
|
- name: Wait for elasticsearch to startup
|
||||||
|
wait_for: host={{es_api_host}} port={{es_api_port}} delay=5 connect_timeout=1
|
||||||
|
|
@ -17,7 +17,7 @@ LOG_DIR={{log_dir}}
|
||||||
# Elasticsearch PID directory
|
# Elasticsearch PID directory
|
||||||
PID_DIR={{pid_dir}}
|
PID_DIR={{pid_dir}}
|
||||||
|
|
||||||
ES_JVM_OPTIONS={{conf_dir}}/jvm.options
|
#ES_JVM_OPTIONS={{conf_dir}}/jvm.options
|
||||||
|
|
||||||
# Configure restart on package upgrade (true, every other setting will lead to not restarting)
|
# Configure restart on package upgrade (true, every other setting will lead to not restarting)
|
||||||
#ES_RESTART_ON_UPGRADE=true
|
#ES_RESTART_ON_UPGRADE=true
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ ExecStart={{es_home}}/bin/elasticsearch \
|
||||||
# stores its logs in /var/log/elasticsearch and does not use
|
# stores its logs in /var/log/elasticsearch and does not use
|
||||||
# journalctl by default. If you also want to enable journalctl
|
# journalctl by default. If you also want to enable journalctl
|
||||||
# logging, you can simply remove the "quiet" option from ExecStart.
|
# logging, you can simply remove the "quiet" option from ExecStart.
|
||||||
|
|
||||||
StandardOutput=journal
|
StandardOutput=journal
|
||||||
StandardError=inherit
|
StandardError=inherit
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue