knife-zero 1.8.2 → 1.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/chef/knife/zero_bootstrap.rb +22 -0
- data/lib/chef/knife/zero_diagnose.rb +4 -4
- data/lib/knife-zero/version.rb +1 -1
- data/test/knife-zero/test_versioin.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebc675803ccbf5f586711666bfee3b4a9ec46687
|
4
|
+
data.tar.gz: f00a5d34ae9b64a051c62f97b45b09e2b7312a33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54bac746bf8b408d0eec0d669c25527c8e8ade834f35534340931cc807219786740e804e42ed796d8a482f3d28b374b93fb5b950b11a811be4a3ace07eab0efc
|
7
|
+
data.tar.gz: dc710abf2017e12553ed1ae187e6fe4358f1d899b8ba55b862269bf90c36de9a23756eefa11e1a9800d372770dccff82d699fa0044749715f30314a86418d495
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,15 @@
|
|
2
2
|
|
3
3
|
## Unreleased
|
4
4
|
|
5
|
+
## v1.8.3
|
6
|
+
|
7
|
+
- include Chef#3900 until merge.
|
8
|
+
- add option --json-attribute-file FILE
|
9
|
+
|
10
|
+
## v1.8.2
|
11
|
+
|
12
|
+
- Cleanup: Swap chef_client and converge.
|
13
|
+
|
5
14
|
## v1.8.1
|
6
15
|
|
7
16
|
- Follow Chef: check first_boot_attribute_from_file flag for knife_zero.host attribute(normal).
|
@@ -26,7 +26,28 @@ class Chef
|
|
26
26
|
:default => true,
|
27
27
|
:proc => lambda { |v| Chef::Config[:knife][:bootstrap_converge] = v }
|
28
28
|
|
29
|
+
## monkey for #3900 >>
|
30
|
+
unless options.has_key?(:first_boot_attributes_from_file)
|
31
|
+
option :first_boot_attributes_from_file,
|
32
|
+
:long => "--json-attribute-file FILE",
|
33
|
+
:description => "A JSON file to be used to the first run of chef-client",
|
34
|
+
:proc => lambda { |o| Chef::JSONCompat.parse(File.read(o)) },
|
35
|
+
:default => nil
|
36
|
+
|
37
|
+
def render_template
|
38
|
+
@config[:first_boot_attributes].merge!(@config[:first_boot_attributes_from_file]) if @config[:first_boot_attributes_from_file]
|
39
|
+
super
|
40
|
+
end
|
41
|
+
## monkey for #3900 <<
|
42
|
+
end
|
43
|
+
|
29
44
|
def run
|
45
|
+
## monkey for #3900 >>
|
46
|
+
if @config[:first_boot_attributes].any? && @config[:first_boot_attributes_from_file]
|
47
|
+
raise "You cannot pass both --json-attributes and --json-attribute-file."
|
48
|
+
end
|
49
|
+
## monkey for #3900 <<
|
50
|
+
|
30
51
|
if @config[:first_boot_attributes_from_file]
|
31
52
|
@config[:first_boot_attributes_from_file] = @config[:first_boot_attributes_from_file].merge(build_knifezero_attributes_for_node)
|
32
53
|
else
|
@@ -65,6 +86,7 @@ class Chef
|
|
65
86
|
}
|
66
87
|
attr
|
67
88
|
end
|
89
|
+
|
68
90
|
end
|
69
91
|
end
|
70
92
|
end
|
@@ -20,7 +20,7 @@ class Chef
|
|
20
20
|
def initialize(argv = [])
|
21
21
|
super
|
22
22
|
@bootstrap = Chef::Knife::ZeroBootstrap.new
|
23
|
-
@
|
23
|
+
@converge = Chef::Knife::ZeroConverge.new
|
24
24
|
end
|
25
25
|
|
26
26
|
def run
|
@@ -41,10 +41,10 @@ class Chef
|
|
41
41
|
ui.msg @bootstrap.config.to_yaml
|
42
42
|
ui.msg ""
|
43
43
|
|
44
|
-
ui.msg "Zero
|
44
|
+
ui.msg "Zero Converge Config"
|
45
45
|
ui.msg "===================="
|
46
|
-
@
|
47
|
-
ui.msg @
|
46
|
+
@converge.merge_configs
|
47
|
+
ui.msg @converge.config.to_yaml
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
data/lib/knife-zero/version.rb
CHANGED