Skip to content

Commit

Permalink
Fix WARN on empty/template meta/main.yaml (#4379)
Browse files Browse the repository at this point in the history
  • Loading branch information
GElkayam authored Jan 20, 2025
1 parent 9eecae0 commit 971d330
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ansiblelint/rules/role_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def matchyaml(self, file: Lintable) -> list[MatchError]:
if file.kind not in ("meta", "role", "playbook"):
return result

if file.kind == "meta":
if file.kind == "meta" and file.data:
for role in file.data.get("dependencies", []):
if isinstance(role, dict):
role_name = role["role"]
Expand Down

0 comments on commit 971d330

Please # to comment.