Automation · Configuration Management
Desired State
Cheat sheet · https://pcornel.dk/topic.php?topic=5378
Answer
Desired state is the declared end configuration a system should have, such as package installed or service running. The configuration management tool works out and applies the steps to reach it.
Remember
- Declare what the end state is, not the steps.
- The tool decides how to reach it.
- Desired state is versioned and reviewed.
First checks
- Desired configuration in git — source
ansible-playbook site.yml --check— compare- Reviewed merge requests — change control
Verify in this order
git → desired state → enforced on hosts
Where it usually breaks
Configuration/input → graph/state refresh → plan → provider API request → provider terminal result → resource read-back → effective service state → workload.
Configuration Management → Desired State · operational reference
| Layer | Configuration Management → Desired State operational reference |
|---|---|
| Context identity | Microsoft DSC 3.0/current + exact revision/input/target identity |
| Persistent intent | Versioned contract/configuration with explicit ownership and prerequisites |
| Verification | Validate inputs/read current state → exercise bounded operation → independent target read-back |
| Output contract | Preserve structured status/IDs/properties before human formatting |
| Failure boundary | Separate source/input/engine/controller execution from downstream target outcome |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5378