FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 4bad2b52 authored by Dr Catherine Pitt's avatar Dr Catherine Pitt
Browse files

Implement ansible_lint_skip tag on TasksInRoles rule

parent 52de9524
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,9 @@ class TasksInRoles(AnsibleLintRule):
def matchplay(self, playbookfile, play):
msg = "Found a task in a play, should be in a role"
if playbookfile['type'] == 'playbook' and 'tasks' in play:
tags = play.get('tags',[])
if 'skip_ansible_lint' in tags:
return None
matches = []
for t in play['tasks']:
match = "Task {} found at line {}".format(t.get('name',''),t['__line__'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment