References for writing Chef idempotent


#1

I'm looking for some guidance or reference to get started with writing idempotent style in Chef.


#2

Most Chef resources are idempotent by design (file, package, etc.) but when you start using execute and other similar resources they may have side-effects. You'll want to make your code have fewer side-effects by using guards to only execute when you're absolutely sure you should.

https://docs.chef.io/resource_common.html#guards