Automation and APIs
Idempotence
Doing it again changes nothing: a run that describes a state leaves a device already in that state alone.
Idempotence means doing it again changes nothing. An idempotent playbook compares what is with what should be and
changes only the difference, so a second run reports changed=0. So it is safe to repeat, and changed means a
device was not as described. A script of commands is not idempotent: replayed, it may add a line twice or fail. In
HTTP, PUT and DELETE are idempotent; POST is not.
Read next
- Configuration management Writing the wanted configuration down as files and letting a tool make every device match it.
- Configuration drift A device's running config moving away from its intended one, usually through changes made by hand.
- REST API An HTTP interface where every thing is a URL and the methods are the verbs: GET reads, POST creates, PUT and PATCH change, DELETE removes.