mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 00:22:09 +02:00
ansible-lint: add page (#16193)
* ansible-lint: add page * Update pages/common/ansible-lint.md Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> * Update pages/common/ansible-lint.md Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Wiktor Perskawiec <git@spageektti.cc> --------- Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> Co-authored-by: Wiktor Perskawiec <git@spageektti.cc>
This commit is contained in:
parent
0bcbb3e96e
commit
07880233d2
1 changed files with 24 additions and 0 deletions
24
pages/common/ansible-lint.md
Normal file
24
pages/common/ansible-lint.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
# ansible-lint
|
||||
|
||||
> Apply rules and follow best practices with your automation content.
|
||||
> More information: <https://ansible.readthedocs.io/projects/lint/>.
|
||||
|
||||
- Lint a specific playbook and a role directory:
|
||||
|
||||
`ansible-lint {{path/to/playbook_file}} {{path/to/role_directory}}`
|
||||
|
||||
- Lint a playbook while excluding specific rules:
|
||||
|
||||
`ansible-lint {{[-x|--exclude-rules]}} {{rule1,rule2,...}} {{path/to/playbook_file}}`
|
||||
|
||||
- Lint a playbook in offline mode and format output as PEP8:
|
||||
|
||||
`ansible-lint {{[-o|--offline]}} {{[-p|--parseable]}} {{path/to/playbook_file}}`
|
||||
|
||||
- Lint a playbook using a custom rules directory:
|
||||
|
||||
`ansible-lint {{[-r|--rules]}} {{path/to/custom_rules_directory}} {{path/to/playbook_file}}`
|
||||
|
||||
- Lint all Ansible content recursively in a given directory:
|
||||
|
||||
`ansible-lint {{path/to/project_directory}}`
|
Loading…
Add table
Reference in a new issue