From ce7ec583cc3eeb3909832c566906455913e05686 Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Fri, 30 Oct 2026 17:10:24 -0600 Subject: [PATCH] refactor: use is string test for string type checks Ansible uses the AnsibleUnsafeText data type for values from potentially unsafe sources, including command and shell output. Checking type_debug for str or unicode rejects these string values; the is string test accepts them. Assisted-by: Codex model GPT-6-Sol medium Issue Tracker Tickets (Jira or BZ if any): RHELMISC-44591 --- tasks/assert_role_vars.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/assert_role_vars.yml b/tasks/assert_role_vars.yml index 5d028ced..aa9c7707 100644 --- a/tasks/assert_role_vars.yml +++ b/tasks/assert_role_vars.yml @@ -103,7 +103,7 @@ - name: Assert mode in podman_credential_files is a string or integer ansible.builtin.assert: that: - - (item.mode | type_debug) in ['str', 'int', 'unicode'] + - item.mode is string or (item.mode | type_debug) == 'int' fail_msg: >- podman_credential_files[{{ idx }}].mode must be a string or integer, got {{ item.mode | type_debug }}