This is a rule set for ansible-lint .
- Install ansible-lint (ex: pip install ansible-lint)
- Copy or git clone on your ansible playbook repository with rules name
- Run ansible lint with -r rules flag (ex: ansible-lint -r rules <your playbook file>)
code | sample message |
---|---|
E3 | Task |
E302 | Include should has tags |
E303 | Use ":" YAML syntax when arguments are over 4 |
E306 | Variable should be lowercase "{{ foo }}" |
E4 | Module |
E402 | Template file should has '.j2' extension |
E403 | Yum shouldn't has with_items argument |
E404 | Pip shouldn't has with_items argument |
E6 | Formatting |
E603 | Use true/false instead of yes/no |
E604 | true/false should be started from non-capitalized letter |
E7 | Metadata |
E704 | Incorrect Dependencies in meta |
E706 | Absent Role name in meta |
E707 | Incorrect Issue tracker in meta |
Because user may want to use a command to correct use. Since we separate these rule, user can disable specific rule easily.
If you can manage playbook your self, consider set skip_ansible_lint tag.
tsukinowasha/ansible-lint-rules
These rules are used in the Tsukinowa Inc. , but anyone can use with the license (MIT).
MIT License (same as ansible-lint)