Feature #1353
Foreman should be able to handle pre and post hook action.
| Status: | Closed | Start: | 11/24/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | % Done: | 100% |
||
| Category: | Plugins-Engines | |||
| Target version: | 1.1 | |||
| Backlog: | No | Difficulity: | ||
| Votes: | 2 (View) |
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
Related issues
| related to Foreman - Feature #58: trigger actions when a New sucessful host is added | Closed | 11/03/2009 | ||
| related to Foreman - Feature #1194: Support hooking into host creation/deletion | Resolved | 09/29/2011 |
Associated revisions
Revision ca166dba271114a9dbf26ead69071457d703fdc7
fixes #1353 added custom hook when host build mode changes
see http://theforeman.org/projects/foreman/wiki/Custom_Hooks_in_Plugin
History
Updated by Greg Sutcliffe over 1 year 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 over 1 year 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 Rytis Sileika 9 months ago
+1
My use case:
I want to remove node from Pulp server before I rebuild it.
Updated by Ohad Levy 7 months 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 6 months 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 6 months ago
- Category set to Plugins-Engines
- Assigned to set to Joseph Magen
- Target version set to 1.1
Updated by Anonymous 6 months ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset ca166dba271114a9dbf26ead69071457d703fdc7.
