What is your idempotency review checklist for a PR?
IntermediateProductionProject Structure and Design
Answer
- Second run reports
changed=0(checked in Molecule's idempotence step). - No
shell/commandwithout guards. state: latestavoided for packages unless patching is the goal.- Templates contain no timestamps or random values.
- Handlers used instead of unconditional restarts.
--check --diffoutput is sane.- Passwords use fixed salts or
update_password: on_create. - Downloads have a checksum.
Most "flapping" playbooks fail on 2 or 4.
More on Project Structure and Design
What does a production Ansible repository look like?BeginnerMonorepo or separate repos for roles? How do you decide?IntermediateHow do you structure inventories for dev, stage and prod?BeginnerHow do you prevent someone from running a playbook against production by accident?IntermediateWhat does "thin playbooks, fat roles" mean?IntermediateWhat makes a well-designed role?Intermediate