ansible-lint-rules
ansible-lint-rules copied to clipboard
ansible-lint rules
==================================== Rules for ansible-lint |travisstatus|
.. |travisstatus| image:: https://travis-ci.org/lean-delivery/ansible-lint-rules.svg?branch=master :target: https://travis-ci.org/lean-delivery/ansible-lint-rules
This is a rule set for ansible-lint <https://github.com/willthames/ansible-lint>
_ .
How to use
- Install
ansible-lint
(ex:pip install ansible-lint
) - Copy or
git clone
on your ansible playbook repository withrules
name - Run ansible lint with
-r rules
flag (ex:ansible-lint -r rules <your playbook file>
)
Rules
+------------+----------------------------------------------------------------------+ |code |sample message | +============+======================================================================+ |E2 |Formatting | +------------+----------------------------------------------------------------------+ |E207 |Use "dict.items" instead of "dict.iteritems" | +------------+----------------------------------------------------------------------+ |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 |Idiom | +------------+----------------------------------------------------------------------+ |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 | +------------+----------------------------------------------------------------------+
Why so many shell module lint?
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.
Original repo
tsukinowasha/ansible-lint-rules <https://github.com/tsukinowasha/ansible-lint-rules>
_
These rules are used in the Tsukinowa Inc. <http://tsukinowa.jp>
_ , but anyone can use with the license (MIT).
License
MIT License (same as ansible-lint)