Rex
Rex copied to clipboard
Add more on_no_change hooks
User story
As maintainer, I would like to add more on_no_change hooks to resources, so I can provide a common interface for resources which could trigger further actions based on whether they made a change or not.
Describe the solution you'd like
Some commands/resources for which we can consider adding on_no_change hooks:
- Sync
- Cron
- Host
- Pkg
- Sysctl
- Fs
- Augeas
Describe alternatives you've considered
For now, I think it's fine to add on_no_change hooks similar to the current on_change hooks. An interesting, but much more involved implementation would be to continue creating a common Resource class, which could implement it in a more generic fashion.
Additional context
This is basically a continuation of #670, after #1386 added on_no_change hooks for file commands.