Pcornel
Automation · Configuration Management

Desired State

Cheat sheet · https://pcornel.dk/topic.php?topic=5378

Back to the Topic

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

LayerConfiguration Management → Desired State operational reference
Context identityMicrosoft DSC 3.0/current + exact revision/input/target identity
Persistent intentVersioned contract/configuration with explicit ownership and prerequisites
VerificationValidate inputs/read current state → exercise bounded operation → independent target read-back
Output contractPreserve structured status/IDs/properties before human formatting
Failure boundarySeparate 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

Confirmation

Confirm action

Continue?