Interview Prep/Ansible/Vault, Privilege Escalation and Error Handling

What do `ansible-lint` and `yamllint` check?

BeginnerConceptVault, Privilege Escalation and Error Handling
Answer

yamllint checks YAML style: indentation, line length, trailing spaces, truthy values. ansible-lint checks Ansible best practices: FQCN use, unnamed tasks, command used where a module exists, missing changed_when, risky file permissions, deprecated syntax.

ansible-lint site.yml roles/
ansible-lint --profile production

Profiles go from min to production and get stricter. Run both locally via pre-commit and in CI so style problems never reach review.

All Ansible questions Roadmap: Ansible

More on Vault, Privilege Escalation and Error Handling