From 116883029a88bf0741a9c7be46c573dbb07bbc4e Mon Sep 17 00:00:00 2001 From: Olivia Yan Date: Thu, 2 Apr 2026 19:20:27 -0400 Subject: [PATCH] Fix SPLUNK_LISTEN_ON_IPV6="false" being treated as truthy The string "false" passed via --env is a non-empty string, which is truthy in Python and Jinja2. This caused mgmtHostPort to be set to [::1]:8089 (IPv6) even when the user explicitly set the variable to "false". Normalize the value consistently with other boolean env vars in environ.py (e.g. SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH). Co-Authored-By: Claude Opus 4.6 --- inventory/environ.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inventory/environ.py b/inventory/environ.py index 9d61f8fd..fa62d0d6 100755 --- a/inventory/environ.py +++ b/inventory/environ.py @@ -739,7 +739,7 @@ def getIPv6(vars_scope): """ Set specific environment variables to apply IPv6 configurations """ - vars_scope["splunk"]["listen_on_ipv6"] = os.environ.get("SPLUNK_LISTEN_ON_IPV6", False) + vars_scope["splunk"]["listen_on_ipv6"] = os.environ.get("SPLUNK_LISTEN_ON_IPV6", "").lower() == "true" def getRandomString():