File: UnsetVariableMatcherRule.py

package info (click to toggle)
ansible-lint 4.1.0%2Bdfsg.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,096 kB
  • sloc: python: 3,373; sh: 4; makefile: 2
file content (12 lines) | stat: -rw-r--r-- 392 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
from ansiblelint import AnsibleLintRule


class UnsetVariableMatcherRule(AnsibleLintRule):
    id = 'TEST0002'
    shortdesc = 'Line contains untemplated variable'
    description = 'This is a test rule that looks for lines ' + \
                  'post templating that still contain {{'
    tags = {'fake', 'dummy', 'test2'}

    def match(self, filename, line):
        return "{{" in line