Skip to content

Commit 5f138a8

Browse files
authored
ansible-lint: skip blocks (#850)
Signed-off-by: Christian Berendt <berendt@osism.tech>
1 parent ca5111e commit 5f138a8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ansible-lint/files/osism_fqcn.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ def matchtask(
3333
print(exception)
3434
sys.exit(0)
3535

36+
# Skip validation for block, rescue, and always constructs
37+
if "action" not in task or "__ansible_module_original__" not in task["action"]:
38+
return False
39+
3640
for category in osism_fqcn_list:
3741
if (
3842
task["action"]["__ansible_module_original__"]

0 commit comments

Comments
 (0)