Interview Prep/Ansible/Project Structure and Design

What Git workflow do you use for Ansible code?

BeginnerProductionProject Structure and Design
Answer

Trunk-based with short-lived branches and pull requests. Branch protection requires CI (yamllint, ansible-lint, Molecule, syntax check) and one review before merging to main.

Merges to main auto-deploy to dev and stage via a pipeline, and prod needs an approval gate. Commit messages explain why the change is needed. No one runs ad hoc edits on servers, so Git history is the audit trail.

All Ansible questions Roadmap: Ansible

More on Project Structure and Design