Apply rules and follow best practices with your automation content. More information: https://ansible.readthedocs.io/projects/lint/.
ansible-lint {{path/to/playbook_file}} {{path/to/role_directory}}
ansible-lint {{[-x|--exclude-rules]}} {{rule1,rule2,...}} {{path/to/playbook_file}}
ansible-lint {{[-o|--offline]}} {{[-p|--parseable]}} {{path/to/playbook_file}}
ansible-lint {{[-r|--rules]}} {{path/to/custom_rules_directory}} {{path/to/playbook_file}}
ansible-lint {{path/to/project_directory}}