Interview Prep/Ansible/Security: Vault, Become and Compliance

How would you scan your Ansible repo for security problems before merge?

IntermediateScenarioSecurity: Vault, Become and Compliance
Answer

Situation read → Shift-left.

What I'd do → In CI run ansible-lint (with the production profile), yamllint, a secret scanner such as gitleaks, and ansible-playbook --syntax-check. Fail the build on findings.

ansible-lint --profile production
gitleaks detect --source .

Why → Cheap automated gates catch plain-text secrets and bad practices before they reach a server.

Interview tip → ansible-lint profiles go from min to production.

All Ansible questions Roadmap: Ansible

More on Security: Vault, Become and Compliance