Project

General

Profile

Actions

Feature #1353

closed

Foreman should be able to handle pre and post hook action.

Added by Romain Vrignaud almost 13 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Plugin integration
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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 2 (0 open2 closed)

Related to Foreman - Feature #1194: Support hooking into host creation/deletionResolvedJoseph Magen09/29/2011Actions
Related to Foreman - Feature #58: trigger actions when a New sucessful host is addedClosedJoseph Magen11/03/2009Actions
Actions #1

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?

Actions #2

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.

Actions #3

Updated by Ohad Levy almost 13 years ago

I'm guessing we can add observer actions to most stuff

Actions #4

Updated by Rytis Sileika about 12 years ago

+1

My use case:

I want to remove node from Pulp server before I rebuild it.

Actions #5

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

Actions #6

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

Actions #7

Updated by Ohad Levy almost 12 years ago

  • Category set to Plugin integration
  • Assignee set to Joseph Magen
  • Target version set to 1.1
Actions #8

Updated by Anonymous almost 12 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF