Options (4)
-x, --exclude-rulesbooleanLint a playbook while excluding specific rules
Example:
ansible-lint {{[-x|--exclude-rules]}} {{rule1,rule2,...}} {{path/to/playbook_file}}-o, --offlinebooleanLint a playbook in offline mode and format output as PEP8
Example:
ansible-lint {{[-o|--offline]}} {{[-p|--parseable]}} {{path/to/playbook_file}}-p, --parseablebooleanLint a playbook in offline mode and format output as PEP8
Example:
ansible-lint {{[-o|--offline]}} {{[-p|--parseable]}} {{path/to/playbook_file}}-r, --rulesbooleanLint a playbook using a custom rules directory
Example:
ansible-lint {{[-r|--rules]}} {{path/to/custom_rules_directory}} {{path/to/playbook_file}}Examples (5)
Lint a specific playbook and a role directory
ansible-lint path/to/playbook_file path/to/role_directoryLint a playbook while excluding specific rules
ansible-lint [-x|--exclude-rules] rule1,rule2,... path/to/playbook_fileLint a playbook in offline mode and format output as PEP8
ansible-lint [-o|--offline] [-p|--parseable] path/to/playbook_fileLint a playbook using a custom rules directory
ansible-lint [-r|--rules] path/to/custom_rules_directory path/to/playbook_fileLint all Ansible content recursively in a given directory
ansible-lint path/to/project_directorymade by @shridhargupta | data from tldr-pages