knife-zero 1.8.2 → 1.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d3c54264c03d55412eecd072c0b7383b12f8bead
4
- data.tar.gz: f392fdc368ee1035a433e59a2166e586523c6630
3
+ metadata.gz: ebc675803ccbf5f586711666bfee3b4a9ec46687
4
+ data.tar.gz: f00a5d34ae9b64a051c62f97b45b09e2b7312a33
5
5
  SHA512:
6
- metadata.gz: f96d14bcb72c719a9cf1f0dea34784b828424779425568902edda23e724dd680abad35226c858443d17e34372bc5c45d5397d4e72882c755934d10d4282ca8ec
7
- data.tar.gz: 28cf727c4bf98d683f3661cec5e3e5df92b75c8001b16d746b341d0ea708c1f3af618a5349494bf0d1964222a889be9bfa41fa03e4deae01575e338fbe1402a6
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
- @chef_client = Chef::Knife::ZeroChefClient.new
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 ChefClient Config"
44
+ ui.msg "Zero Converge Config"
45
45
  ui.msg "===================="
46
- @chef_client.merge_configs
47
- ui.msg @chef_client.config.to_yaml
46
+ @converge.merge_configs
47
+ ui.msg @converge.config.to_yaml
48
48
  end
49
49
  end
50
50
  end
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Zero
3
- VERSION = "1.8.2"
3
+ VERSION = "1.8.3"
4
4
  MAJOR, MINOR, TINY = VERSION.split('.')
5
5
  end
6
6
  end
@@ -2,6 +2,6 @@ require "knife-zero/version"
2
2
 
3
3
  class TC_Version < Test::Unit::TestCase
4
4
  test "returns version correctly" do
5
- assert_equal("1.8.2", Knife::Zero::VERSION)
5
+ assert_equal("1.8.3", Knife::Zero::VERSION)
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.2
4
+ version: 1.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - sawanoboly