I’m looking at replacing our foreman_hooks scripts with webhooks. In foreman_hooks we can number the hook scripts to control not only the order in which they run but also where in the orchestration process they run. For example, a hook script prefixed with 05_
will run before Foreman creates dns/dhcp records. Explained in GitHub - theforeman/foreman_hooks: Run custom hook scripts on Foreman events
We use this on the update
event - if subnet or ip is changed for a host we want to save any comments and aliases (cnames) for the dns host object (in infoblox) before Foreman deletes it and creates a new host object. We then call a hook script again after Foreman has created the new dns object to add comment/aliases to the new object.
In webhooks I see no obvious way of ordering things like this - is it possible?