ansible-lint
Usage:
Generate a text file '.ansible-lint-ignore' that ignores all found violations. Each line contains filename and rule id separated by a space:
ansible-lint --generate-ignore
pre-commit / CI
Unfortunately, there is no way to run only in new or changed files.