From 96500886b153275460847ddad47f1f9ac83e9661 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 26 Apr 2023 09:28:48 +0200 Subject: [PATCH] fix: check for non-empty loop_type in CheckDeprecatedBareVars --- ansiblelater/rules/CheckDeprecatedBareVars.py | 3 +++ 1 file changed, 3 insertions(+) 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",