[PATCH 07/26] lucid: filter empty argspec validation tasks
Daniel Gomez <[email protected]> Tue, 19 May 2026 15:28:04 +0200
| Newsgroups | dev.linux.lists.kdevops |
|---|---|
| Message-ID | <[email protected]> |
From: Daniel Gomez <[email protected]> Ansible injects a synthetic Validating arguments against arg spec None task for every role in a playbook even when the role defines no argument spec, as documented in ansible/ansible#82505. On tag-filtered kdevops runs these synthetic tasks fire unconditionally and flood the screen with header lines the user cannot act on, because the upstream issue has not been fixed. Short-circuit v2_playbook_on_task_start when the task name matches the synthetic marker, recording it to the log for audit completeness but skipping header emission, state updates, and play-header flushing. Real tasks in the same play continue to trigger the play header the first time they run, so nothing visible to the user is lost. Generated-by: Claude AI Signed-off-by: Daniel Gomez <[email protected]> --- callback_plugins/lucid.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/callback_plugins/lucid.py b/callback_plugins/lucid.py index 8be912c1..856a918b 100644 --- a/callback_plugins/lucid.py +++ b/callback_plugins/lucid.py @@ -434,8 +434,18 @@ class CallbackModule(CallbackBase): def v2_playbook_on_task_start(self, task, is_conditional): """Task started""" + task_name = task.get_name().strip() + + # Suppress empty arg spec validation tasks injected by Ansible for + # every role regardless of tag filtering (ansible/ansible#82505). + # Still flush the play header in case real tasks follow. + is_empty_argspec = task_name == "Validating arguments against arg spec None" + if is_empty_argspec: + self._write_to_log(f"TASK: {task_name}") + return + self._flush_play_header() - self.current_task_name = task.get_name().strip() + self.current_task_name = task_name # Initialize with play hosts so display is stable from the start self.current_task_hosts = list(self.play_hosts) if self.play_hosts else [] -- 2.53.0