ansible-lint [lintables...]

Ansible static code analysis


lintablesFiles to lint


--help, -hShow help for ansible-lint
--list-rules, -LList all the rules
--list-tags, -TList all the tags and the rules they cover
--format, -f <-f>Stdout formatting
  • Repeatable ♾
  • Repeatable 2x
-pParseable output, same as '-f pep8'
--progressiveReturn success if it detects a reduction in number of violations compared with previous git commit. This feature works only in git repositories
--project-dir <PROJECT_DIR>Location of project/repository, autodetected based on location of configuration file
--rules-dir, -r <RULESDIR>Specify custom rule directories
-RKeep using embedded rules when using '-r'
--write <WRITE_LIST>Allow ansible-lint to reformat YAML files and run rule transforms
--show-relpathDisplay path relative to CWD
--tags, -tOnly check rules whose id/tags match these values
  • Repeatable ♾
  • Repeatable 2x
--skip-list, -x <SKIP_LIST>Only check rules whose id/tags do not match these values
--warn-list, -w <WARN_LIST>Only warn about these rules, unless overridden in config file defaults to 'experimental'
--enable-list <ENABLE_LIST>Activate optional rules by their tag name
--nocolorDisable colored output, same as NO_COLOR=1
--force-colorForce colored output, same as FORCE_COLOR=1
--exclude-paths <EXCLUDE_PATHS...>Path to directories or files to skip. This option is repeatable
--config-file <CONFIG_FILE>Specify configuration file to use. By default it will look for '.ansible-lint' or '.config/ansible-lint.yml'
--offlineDisable installation of requirements.yml
--versionShow version of ansible-lint