Feature #1353
closedForeman should be able to handle pre and post hook action.
Description
It would be awesome to be able to schedule pre and post hook before specific action.
This is one of my use case I'd like to be able to achieve with Foreman :
If I click on "Build an host", I'd like to be able to program an hook to make wget on a webservice I wrote to schedule a Nagios Downtime during the server rebuild"
I'm sure we could find a lot of different use cases.
Thx in advance
Updated by Greg Sutcliffe almost 13 years ago
Seconded - for unattended ArchLinux installs, it is (currently, this may change) necessary to start a Network Block Device (NBD) serving the Arch Install ISO to the PXE booted client. This would replace the manual step of starting and stopping the NBD device.
This could also be used for users to provide arbitrary scripts, such as downloading vmliuz/initrd/iso files for PXE to use, and so on.
Ohad, is this similar to what Foreman does when downloading the initrd/vmlinuz files for existing supported distributions?
Updated by Ohad Levy almost 13 years ago
Greg Sutcliffe wrote:
Ohad, is this similar to what Foreman does when downloading the initrd/vmlinuz files for existing supported distributions?
not at all, Foreman simply tell the proxy where to fetch the boot file from, then the proxy is fetching and putting it in the right place.
Updated by Ohad Levy almost 13 years ago
I'm guessing we can add observer actions to most stuff
Updated by Rytis Sileika about 12 years ago
+1
My use case:
I want to remove node from Pulp server before I rebuild it.
Updated by Ohad Levy almost 12 years ago
i think we can do it by adding additional callbacks (such as after_built, before_built etc)
http://www.intridea.com/blog/2012/3/22/define-custom-callbacks-for-activerecord-and-more
Updated by Joseph Magen almost 12 years ago
I submit a pull request https://github.com/theforeman/foreman/pull/311 which adds a custom callback callback called :ready_for_build
You can read more about this at http://theforeman.org/projects/foreman/wiki/Custom_Hooks_in_Plugin
Updated by Ohad Levy almost 12 years ago
- Category set to Plugin integration
- Assignee set to Joseph Magen
- Target version set to 1.1
Updated by Anonymous almost 12 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset ca166dba271114a9dbf26ead69071457d703fdc7.