Interview Prep/Ansible/Performance, Testing and CI/CD

How do you run a quick syntax and dry run check on all playbooks locally before pushing?

BeginnerScenarioPerformance, Testing and CI/CD
Answer

Situation read → Fast local feedback.

What I'd do →

ansible-playbook playbooks/*.yml --syntax-check
ansible-lint
yamllint .

Add them as a pre-commit hook.

Why → Syntax check catches parse errors; lint catches bad practice.

Interview tip → --syntax-check doesn't validate module arguments; Molecule and check mode do.

All Ansible questions Roadmap: Ansible

More on Performance, Testing and CI/CD