.TH ANSIBLE-LINT "1" "June 2023" "ansible-lint" "User Commands" .SH NAME ansible-lint \- lint tool for Ansible playbooks .SH DESCRIPTION usage: ansible\-lint [\-h] [\-P | \fB\-L\fR | \fB\-T]\fR .TP [\-f {brief,full,md,json,codeclimate,quiet,pep8,sarif}] [\-\-sarif\-file SARIF_FILE] [\-q] [\-\-profile {min,basic,moderate,safety,shared,production}] [\-p] [\-\-project\-dir PROJECT_DIR] [\-r RULESDIR] [\-R] [\-s] [\-\-write [WRITE_LIST]] [\-\-show\-relpath] [\-t TAGS] [\-v] [\-x SKIP_LIST] [\-\-generate\-ignore] [\-w WARN_LIST] [\-\-enable\-list ENABLE_LIST] [\-\-nocolor] [\-\-force\-color] [\-\-exclude EXCLUDE_PATHS [EXCLUDE_PATHS ...]] [\-c CONFIG_FILE] [\-i IGNORE_FILE] [\-\-offline] [\-\-version] [lintables ...] .SS "positional arguments:" .TP lintables One or more files or paths. When missing it will enable auto\-detection mode. .SS "options:" .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .TP \fB\-P\fR, \fB\-\-list\-profiles\fR List all profiles, no formatting options available. .TP \fB\-L\fR, \fB\-\-list\-rules\fR List all the rules. For listing rules only the following formats for argument \fB\-f\fR are supported: {brief, full, md} with 'brief' as default. .TP \fB\-T\fR, \fB\-\-list\-tags\fR List all the tags and the rules they cover. Increase the verbosity level with `\-v` to include 'opt\-in' tag and its rules. .TP \fB\-f\fR {brief,full,md,json,codeclimate,quiet,pep8,sarif}, \fB\-\-format\fR {brief,full,md,json,codeclimate,quiet,pep8,sarif} stdout formatting, json being an alias for codeclimate. (default: None) .TP \fB\-\-sarif\-file\fR SARIF_FILE SARIF output file .TP \fB\-q\fR quieter, reduce verbosity, can be specified twice. .TP \fB\-\-profile\fR {min,basic,moderate,safety,shared,production} Specify which rules profile to be used. .TP \fB\-p\fR, \fB\-\-parseable\fR parseable output, same as '\-f pep8' .TP \fB\-\-project\-dir\fR PROJECT_DIR Location of project/repository, autodetected based on location of configuration file. .TP \fB\-r\fR RULESDIR, \fB\-\-rules\-dir\fR RULESDIR Specify custom rule directories. Add \fB\-R\fR to keep using embedded rules from \fI\,/usr/lib/python3/dist-packages/ansiblelint/rules\/\fP .TP \fB\-R\fR Keep default rules when using \fB\-r\fR .TP \fB\-s\fR, \fB\-\-strict\fR Return non\-zero exit code on warnings as well as errors .TP \fB\-\-write\fR [WRITE_LIST] Allow ansible\-lint to reformat YAML files and run rule transforms (Reformatting YAML files standardizes spacing, quotes, etc. A rule transform can fix or simplify fixing issues identified by that rule). You can limit the effective rule transforms (the \&'write_list') by passing a keywords 'all' or 'none' or a comma separated list of rule ids or rule tags. YAML reformatting happens whenever '\-\-write' or '\-\-write=' is used. '\-\-write' and '\-\-write=all' are equivalent: they allow all transforms to run. The effective list of transforms comes from 'write_list' in the config file, followed whatever '\-\-write' args are provided on the commandline. '\-\-write=none' resets the list of transforms to allow reformatting YAML without running any of the transforms (ie '\-\-write=none,rule\-id' will ignore write_list in the config file and only run the rule\-id transform). .TP \fB\-\-show\-relpath\fR Display path relative to CWD .TP \fB\-t\fR TAGS, \fB\-\-tags\fR TAGS only check rules whose id/tags match these values .TP \fB\-v\fR Increase verbosity level (\fB\-vv\fR for more) .TP \fB\-x\fR SKIP_LIST, \fB\-\-skip\-list\fR SKIP_LIST only check rules whose id/tags do not match these values. e.g: \fB\-\-skip\-list\fR=\fI\,name\/\fR,run\-once .TP \fB\-\-generate\-ignore\fR Generate a text file '.ansible\-lint\-ignore' that ignores all found violations. Each line contains filename and rule id separated by a space. .TP \fB\-w\fR WARN_LIST, \fB\-\-warn\-list\fR WARN_LIST only warn about these rules, unless overridden in config file. Current version default value is: experimental, jinja[spacing], fqcn[deep] .TP \fB\-\-enable\-list\fR ENABLE_LIST activate optional rules by their tag name .TP \fB\-\-nocolor\fR disable colored output, same as NO_COLOR=1 .TP \fB\-\-force\-color\fR Force colored output, same as FORCE_COLOR=1 .TP \fB\-\-exclude\fR EXCLUDE_PATHS [EXCLUDE_PATHS ...] path to directories or files to skip. This option is repeatable. .TP \fB\-c\fR CONFIG_FILE, \fB\-\-config\-file\fR CONFIG_FILE Specify configuration file to use. By default it will look for '.ansible\-lint', '.config/ansible\-lint.yml', or '.config/ansible\-lint.yaml' .TP \fB\-i\fR IGNORE_FILE, \fB\-\-ignore\-file\fR IGNORE_FILE Specify ignore file to use. By default it will look for '.ansible\-lint\-ignore' or '.config/ansible\-lintignore.txt' .TP \fB\-\-offline\fR Disable installation of requirements.yml and schema refreshing .HP \fB\-\-version\fR