From aaa2441e08edc49d555c3d7d4b2c2e2809f8cb5e Mon Sep 17 00:00:00 2001 From: oddly Date: Sun, 16 Aug 2026 13:50:02 +0200 Subject: [PATCH] fix(kibana): run the readiness probe under bash so pipefail works on dash The Kibana readiness probe starts with set -o pipefail, but the shell task never set an executable, so Ansible ran it under /bin/sh. On Debian and Ubuntu that is dash, which rejects the option and dies with "Illegal option -o pipefail" on every one of its sixty retries, failing converge for every Kibana-deploying scenario on those distros while the distros whose /bin/sh is bash stay green. Adding executable: /bin/bash is already the convention for pipefail shells elsewhere in the collection. The same probe lives in three places and all three get the fix: the two role copies in roles/kibana/tasks and the stopped-Kibana check in molecule/kibana_extras/verify.yml, where the bug was masked because the task exits 2 for a stopped service anyway. molecule/shared/create.yml matches the grep but is a false positive, its pipefail runs inside a remote bash -s heredoc. Fixes #201 --- molecule/kibana_extras/verify.yml | 1 + roles/kibana/tasks/main.yml | 1 + roles/kibana/tasks/restart_and_verify_kibana.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/molecule/kibana_extras/verify.yml b/molecule/kibana_extras/verify.yml index 9d85b367..d0583725 100644 --- a/molecule/kibana_extras/verify.yml +++ b/molecule/kibana_extras/verify.yml @@ -81,6 +81,7 @@ exit 0 fi exit 1 + executable: /bin/bash register: _dead_probe failed_when: false changed_when: false diff --git a/roles/kibana/tasks/main.yml b/roles/kibana/tasks/main.yml index 4cc5d7bc..97e65729 100644 --- a/roles/kibana/tasks/main.yml +++ b/roles/kibana/tasks/main.yml @@ -168,6 +168,7 @@ exit 0 fi exit 1 + executable: /bin/bash register: _kibana_wait_result until: _kibana_wait_result.rc == 0 retries: 60 diff --git a/roles/kibana/tasks/restart_and_verify_kibana.yml b/roles/kibana/tasks/restart_and_verify_kibana.yml index 5e22cbbc..640979cd 100644 --- a/roles/kibana/tasks/restart_and_verify_kibana.yml +++ b/roles/kibana/tasks/restart_and_verify_kibana.yml @@ -42,6 +42,7 @@ exit 0 fi exit 1 + executable: /bin/bash register: _kibana_http_check until: _kibana_http_check.rc == 0 retries: 60