From c018a3a7d16e67b0838e5573d289bcee72e123b7 Mon Sep 17 00:00:00 2001 From: Stephan Eckweiler Date: Mon, 9 Oct 2017 17:11:06 +0100 Subject: [PATCH] parameterize debian init startup timeout --- defaults/main.yml | 1 + templates/init/debian/elasticsearch.j2 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index f7071da..57f207a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -32,6 +32,7 @@ es_xpack_features: ["alerting","monitoring","graph","ml","security"] #They do not effect the current configuration es_api_host: "localhost" es_api_port: 9200 +es_debian_startup_timeout: 10 # Since ansible 2.2 the following variables need to be defined # to allow the role to be conditionally played with a when condition. diff --git a/templates/init/debian/elasticsearch.j2 b/templates/init/debian/elasticsearch.j2 index 64c2f0a..9fa25f0 100755 --- a/templates/init/debian/elasticsearch.j2 +++ b/templates/init/debian/elasticsearch.j2 @@ -165,7 +165,7 @@ case "$1" in return=$? if [ $return -eq 0 ]; then i=0 - timeout=10 + timeout={{es_debian_startup_timeout}} # Wait for the process to be properly started before exiting until { kill -0 `cat "$PID_FILE"`; } >/dev/null 2>&1 do