Embed Notice
HTML Code
Corresponding Notice
- Embed this notice
feld (feld@bikeshed.party)'s status on Monday, 05-Jun-2023 22:37:24 JSTfeld I honestly don't understand why so much functionality in huge, well-funded open source projects just goes completely undocumented.
Today's lesson: Chef, :delayed_action
delayed_action is not documented, but if you have something you want to *always* run at the end of the Chef client run and you have no obvious reason to do this with a :notifies, you can just do
foo 'bar' do
action: :nothing
delayed_action :run
end
and it will execute your action at the very end
https://www.rubydoc.info/gems/chef/Chef/Resource:delayed_action