diff --git a/ansiblelater/rules/CheckDeprecatedBareVars.py b/ansiblelater/rules/CheckDeprecatedBareVars.py index f3049e8..63ef59d 100644 --- a/ansiblelater/rules/CheckDeprecatedBareVars.py +++ b/ansiblelater/rules/CheckDeprecatedBareVars.py @@ -42,6 +42,9 @@ class CheckDeprecatedBareVars(StandardBase): for task in tasks: loop_type = next((key for key in task if key.startswith("with_")), None) + if not loop_type: + continue + if loop_type in [ "with_items", "with_nested",