foreman_hooks 0.3.11 → 0.3.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -3
- data/lib/foreman_hooks/engine.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e36bbbb7ffec26b6250bc5b073bea7b8237539b1
|
4
|
+
data.tar.gz: 31d5746a12a9d454044e11d32c52350f616b2dd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96726288631740a784979242e476053d5fa9b3e2007af35e428b7a12c6fa52bae7b40c98b556c1ebd22c3dcbc9af58d611ea151d86fc28debdb10f5038e28db4
|
7
|
+
data.tar.gz: a7d8dda6643da1d5e38d5fcb750410bc24ad0e775d0a1f86f677fc2b8f0699cadf4b00fe91752807a51568c8ac004d75cf58caee2d6545f209e498cb79b9f25a
|
data/README.md
CHANGED
@@ -16,7 +16,7 @@ Please see the Foreman wiki for appropriate instructions:
|
|
16
16
|
|
17
17
|
The gem name is "foreman_hooks".
|
18
18
|
|
19
|
-
RPM users can install the "
|
19
|
+
RPM users can install the "tfm-rubygem-foreman_hooks" or
|
20
20
|
"rubygem-foreman_hooks" packages.
|
21
21
|
|
22
22
|
# Usage
|
@@ -38,8 +38,8 @@ Examples:
|
|
38
38
|
Every object (or model in Rails terms) in Foreman can have hooks. Check
|
39
39
|
`~foreman/app/models` for the full list, but these are the interesting ones:
|
40
40
|
|
41
|
-
* `host/managed`
|
42
|
-
* `report`
|
41
|
+
* `host/managed`
|
42
|
+
* `config_report` (or `report` in Foreman 1.10 or older)
|
43
43
|
* `nic/managed`
|
44
44
|
* `hostgroup`
|
45
45
|
* `user`
|
@@ -116,6 +116,11 @@ orchestration hooks, an integer prefix in the hook filename will be used as
|
|
116
116
|
the priority value, so influences where it's done in relation to DNS, DHCP, VM
|
117
117
|
creation and other tasks.
|
118
118
|
|
119
|
+
When testing hooks, don't rely on writing logs to /tmp or /var/tmp as you may
|
120
|
+
not be able to see the contents. On modern systemd-based OSes, Apache (and
|
121
|
+
Foreman) is run with a private temp directory to improve security - consider
|
122
|
+
using `~foreman/tmp/` instead, or read `/tmp/systemd-private-*` as root.
|
123
|
+
|
119
124
|
## Hook failures and rollback
|
120
125
|
|
121
126
|
If a hook fails (non-zero return code), the event is logged. For Rails events,
|
data/lib/foreman_hooks/engine.rb
CHANGED
@@ -6,7 +6,7 @@ module ForemanHooks
|
|
6
6
|
ForemanHooks.hooks.each { |klass,events| ForemanHooks.attach_hook(klass.constantize, events) }
|
7
7
|
end
|
8
8
|
|
9
|
-
initializer 'foreman_hooks.register_plugin', :
|
9
|
+
initializer 'foreman_hooks.register_plugin', :before => :finisher_hook do |app|
|
10
10
|
Foreman::Plugin.register :foreman_hooks do
|
11
11
|
end
|
12
12
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_hooks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dominic Cleal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Plugin engine for Foreman that enables running custom hook scripts on
|
14
14
|
Foreman events
|