kafo 0.6.10 → 0.6.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/lib/kafo/hooking.rb +6 -1
- data/lib/kafo/kafo_configure.rb +1 -0
- data/lib/kafo/param.rb +1 -7
- data/lib/kafo/validator.rb +1 -0
- data/lib/kafo/version.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: d356aabda9fad9af796d3871dd9c8bd96b14b757
|
4
|
+
data.tar.gz: 294fa5e00481474a926c7fa2ce15f04135636150
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdf82c1c6d3ceb029d8ec780b0d31dfbf377bacb2e394924e474eeee297415d4364d87a4a93654122c8f4355913dd4ddd34a41d3551f5cf0c693ed5d63adfd1f
|
7
|
+
data.tar.gz: 46ed06896fe0ded9f893792c9056d5cc5da8830debb9ca14f4a806546662def8b6bd7d7a2f0fb5bdc0ae6f586c7f35a2712d99a4331d41c9e483bfe4460aa7c0
|
data/README.md
CHANGED
@@ -259,7 +259,7 @@ in the puppet manifest documentation like this
|
|
259
259
|
type:boolean
|
260
260
|
```
|
261
261
|
|
262
|
-
Supported types are: string, boolean, integer, array, password
|
262
|
+
Supported types are: string, boolean, integer, array, password, hash
|
263
263
|
|
264
264
|
Note that all arguments that are nil (have no value in answers.yaml or you
|
265
265
|
set them UNDEF (see below)) are translated to ```undef``` in puppet.
|
@@ -522,7 +522,8 @@ We currently support the following hooks.
|
|
522
522
|
* init - just after hooking is initialized and kafo is configured, parameters have no values yet
|
523
523
|
* pre_values - just before value from CLI is set to parameters (they already have default values)
|
524
524
|
* pre_validations - just after system checks and before validations are executed (and before interactive wizard is started), at this point all parameter values are already set but not yet stored in answer file
|
525
|
-
*
|
525
|
+
* pre_commit - after validations or interactive wizard have completed, all parameter values are set but not yet stored in the answer file
|
526
|
+
* pre - just before puppet is executed to converge system, after parameter values are stored in the answer file
|
526
527
|
* post - just after puppet is executed to converge system
|
527
528
|
|
528
529
|
Let's assume we want to add the ```--reset-foreman-db``` option to our
|
data/lib/kafo/hooking.rb
CHANGED
@@ -6,9 +6,10 @@ module Kafo
|
|
6
6
|
# init - just after hooking is initialized and kafo is configured, parameters have no values yet
|
7
7
|
# pre_values - just before value from CLI is set to parameters (they already have default values)
|
8
8
|
# pre_validations - just after system checks and before validations are executed (and before interactive wizard is started), at this point all parameter values are already set but not yet stored in answer file
|
9
|
+
# pre_commit - after validations or interactive wizard have completed, all parameter values are set but not yet stored in the answer file
|
9
10
|
# pre - just before puppet is executed to converge system
|
10
11
|
# post - just after puppet is executed to converge system
|
11
|
-
TYPES = [:boot, :init, :pre, :post, :pre_values, :pre_validations]
|
12
|
+
TYPES = [:boot, :init, :pre, :post, :pre_values, :pre_validations, :pre_commit]
|
12
13
|
|
13
14
|
attr_accessor :hooks, :kafo
|
14
15
|
|
@@ -68,6 +69,10 @@ module Kafo
|
|
68
69
|
register(:pre_validations, name, &block)
|
69
70
|
end
|
70
71
|
|
72
|
+
def register_pre_commit(name, &block)
|
73
|
+
register(:pre_commit, name, &block)
|
74
|
+
end
|
75
|
+
|
71
76
|
def register_pre(name, &block)
|
72
77
|
register(:pre, name, &block)
|
73
78
|
end
|
data/lib/kafo/kafo_configure.rb
CHANGED
data/lib/kafo/param.rb
CHANGED
@@ -89,13 +89,7 @@ module Kafo
|
|
89
89
|
end
|
90
90
|
|
91
91
|
validator = Validator.new([self])
|
92
|
-
validations.map!
|
93
|
-
result = v.evaluate(validator)
|
94
|
-
# validate_re returns nil if succeeds
|
95
|
-
result = true if v.name == 'validate_re' && result.nil?
|
96
|
-
result
|
97
|
-
end
|
98
|
-
|
92
|
+
validations.map! { |v| v.evaluate(validator) }
|
99
93
|
validations.all?
|
100
94
|
end
|
101
95
|
|
data/lib/kafo/validator.rb
CHANGED
data/lib/kafo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kafo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marek Hulan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|