Skip to content

lean-delivery/ansible-lint-rules

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rules for ansible-lint travisstatus

This is a rule set for ansible-lint .

How to use

  1. Install ansible-lint (ex: pip install ansible-lint)
  2. Copy or git clone on your ansible playbook repository with rules name
  3. 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

These rules are used in the Tsukinowa Inc. , but anyone can use with the license (MIT).

License

MIT License (same as ansible-lint)