foreman_hooks 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -2
- data/lib/foreman_hooks/util.rb +5 -2
- 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: 46c0a89abfd88c3504155a968576b0bda74eb5d1
|
4
|
+
data.tar.gz: 706af60156c35ae99e53b9c19a7326075d6b938e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f613b965f1671fabebc64ea67ce1afbd883f3a17324f21e118c695ea5eb0bdc63398ee928fa2859f3d804c31b3f3a839264750d1fe949be33b5361bb6221c101
|
7
|
+
data.tar.gz: 01afb060d70cbec9d50170e40bcef5c8960502fb77ba3ebdfc8d48bb92d944066d0370d485927c2300f9df448ad21848c91b91620a4844b28dcc579a608a9057
|
data/README.md
CHANGED
@@ -31,8 +31,7 @@ Examples:
|
|
31
31
|
~foreman/config/hooks/host/managed/create/50_register_system.sh
|
32
32
|
~foreman/config/hooks/host/managed/destroy/15_cleanup_database.sh
|
33
33
|
~foreman/config/hooks/smart_proxy/after_create/01_email_operations.sh
|
34
|
-
|
35
|
-
(`host/managed` is for Foreman 1.2+, change to just `host` for Foreman 1.1)
|
34
|
+
~foreman/config/hooks/audited/adapters/active_record/audit/after_create/01_syslog.sh
|
36
35
|
|
37
36
|
## SELinux notes
|
38
37
|
|
data/lib/foreman_hooks/util.rb
CHANGED
@@ -4,9 +4,11 @@ module ForemanHooks::Util
|
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
|
6
6
|
def render_hook_type
|
7
|
-
case self
|
8
|
-
when Host::Managed
|
7
|
+
case self.class.name
|
8
|
+
when "Host::Managed"
|
9
9
|
'host'
|
10
|
+
when "Host::Discovered"
|
11
|
+
'discovered_host'
|
10
12
|
else
|
11
13
|
self.class.name.downcase
|
12
14
|
end
|
@@ -36,6 +38,7 @@ module ForemanHooks::Util
|
|
36
38
|
end
|
37
39
|
|
38
40
|
def exec_hook_int(stdin_data, *args)
|
41
|
+
args.map!(&:to_s)
|
39
42
|
output, status = if Open3.respond_to? :capture2e
|
40
43
|
Open3.capture2e(*args.push(:stdin_data => stdin_data))
|
41
44
|
else # 1.8
|
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.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dominic Cleal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-16 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
|