public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
* [RFC PATCH 1/2] ansible.cfg: Enable the Ansible debugger when a task fails
@ 2025-07-16  0:11 Chuck Lever
  2025-07-16  0:11 ` [RFC PATCH 2/2] ansible.cfg: Explicitly set the ssh user Chuck Lever
  2025-07-16 17:44 ` [RFC PATCH 1/2] ansible.cfg: Enable the Ansible debugger when a task fails Daniel Gomez
  0 siblings, 2 replies; 6+ messages in thread
From: Chuck Lever @ 2025-07-16  0:11 UTC (permalink / raw)
  To: kdevops; +Cc: Daniel Gomez, Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

This is useful to avoid generating a whole bunch of unwanted output
that can change thread timing.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 kconfigs/Kconfig.ansible_cfg                        | 13 +++++++++++++
 .../roles/ansible_cfg/templates/ansible.cfg.j2      |  1 +
 2 files changed, 14 insertions(+)

diff --git a/kconfigs/Kconfig.ansible_cfg b/kconfigs/Kconfig.ansible_cfg
index b587596bc8d5..48f84d8fe04e 100644
--- a/kconfigs/Kconfig.ansible_cfg
+++ b/kconfigs/Kconfig.ansible_cfg
@@ -10,6 +10,10 @@ config ANSIBLE_CFG_FORKS_SET_BY_CLI
 	bool
 	default $(shell, scripts/check-cli-set-var.sh ANSIBLE_CFG_FORKS)
 
+config ANSIBLE_CFG_TASK_DEBUGGER_SET_BY_CLI
+	bool
+	default $(shell, scripts/check-cli-set-var.sh ANSIBLE_CFG_TASK_DEBUGGER)
+
 menu "Ansible Callback Plugin Configuration"
 choice
 	prompt "Ansible Callback Plugin"
@@ -207,6 +211,15 @@ config ANSIBLE_CFG_FORKS
 
 endif # !ANSIBLE_CFG_FORKS_CUSTOM
 
+config ANSIBLE_CFG_TASK_DEBUGGER
+	bool "Enable the Ansible task debugger on failed tasks"
+	output yaml
+	default n
+	help
+	  When this setting is enabled, a task failure invokes the
+	  Ansible debugger. Generally this is useful only when
+	  running kdevops from the command line.
+
 if DISTRO_OPENSUSE
 
 config ANSIBLE_CFG_RECONNECTION_RETRIES
diff --git a/playbooks/roles/ansible_cfg/templates/ansible.cfg.j2 b/playbooks/roles/ansible_cfg/templates/ansible.cfg.j2
index 2bc916321f42..f71033b2c88f 100644
--- a/playbooks/roles/ansible_cfg/templates/ansible.cfg.j2
+++ b/playbooks/roles/ansible_cfg/templates/ansible.cfg.j2
@@ -10,6 +10,7 @@ show_per_host_start = {{ ansible_cfg_callback_plugin_show_per_host_start }}
 show_task_path_on_failure = {{ ansible_cfg_callback_plugin_show_task_path_on_failure }}
 interpreter_python = {{ ansible_cfg_interpreter_python_string }}
 forks = {{ ansible_cfg_forks }}
+enable_task_debugger = {{ ansible_cfg_task_debugger }}
 {% if ansible_facts['distribution'] == 'openSUSE' %}
 [connection]
 retries = {{ ansible_cfg_reconnection_retries }}
-- 
2.50.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-07-16 18:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-16  0:11 [RFC PATCH 1/2] ansible.cfg: Enable the Ansible debugger when a task fails Chuck Lever
2025-07-16  0:11 ` [RFC PATCH 2/2] ansible.cfg: Explicitly set the ssh user Chuck Lever
2025-07-16 18:05   ` Daniel Gomez
2025-07-16 18:47     ` Chuck Lever
2025-07-16 17:44 ` [RFC PATCH 1/2] ansible.cfg: Enable the Ansible debugger when a task fails Daniel Gomez
2025-07-16 18:38   ` Chuck Lever

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox