knife-zero 1.10.2 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 06a7110f13cc319dbdfa486c76fd6d36c4b02a03
4
- data.tar.gz: 78a63c938cf105802a63a1d134fa6985c36d72b3
3
+ metadata.gz: afd0f61fa28cf5503c87d00457cdbd3f0ca61fc2
4
+ data.tar.gz: e5c765743125b15b55e529df1cfda77dc4a4f855
5
5
  SHA512:
6
- metadata.gz: 467b5875ee53e14272dfd9e39c2c6514f741185707bc23040a462e2bc55afbdf65ef06ce417d9f0e1c92dd7d1fe701b4447755207b08699eaf685698b8fa13c5
7
- data.tar.gz: 73ca397b8343ace527d50460038a4b951df9d570955e5a8c987cf55b25356848ea19f4ee4b42048eea97622dae72794cd75b964167d178e4bd3a072a38fe132d
6
+ metadata.gz: 62e4ffbb9964256340c3bb1c8e9eddfdbc093cd020fa3725d5ad9192dc7e44997195c4598fb0a03c258c1fdc2b28f171f3c55e66983253129c63ddadcf17cbb0
7
+ data.tar.gz: e2fff31c58c0e232396e76ad6a7f7937d777707f540b3b9ba634ca5f6f75975175ad9f9ee063f382ff36dbf33df8aff43334604f0920150554ef196c5eddae73
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## v1.11.0
6
+
7
+ - Add dependency chef "~> 12.6.0"
8
+ - Feature: Allow USER@FQDN format for bootstrap commands #37
9
+ - Remove: Option first_boot_attributes compatibility before 12.6.
10
+
5
11
  ## v1.10.2
6
12
 
7
13
  - Bugfix: `--json-attribute` was broken. #73
data/knife-zero.gemspec CHANGED
@@ -28,5 +28,5 @@ Gem::Specification.new do |spec|
28
28
  spec.add_development_dependency "simplecov"
29
29
  spec.add_development_dependency "simplecov-rcov"
30
30
 
31
- spec.add_runtime_dependency "chef"
31
+ spec.add_runtime_dependency "chef", "~> 12.6.0"
32
32
  end
@@ -12,14 +12,14 @@ class Chef
12
12
  Chef::Knife::BootstrapSsh.load_deps
13
13
  end
14
14
 
15
- banner "knife zero bootstrap FQDN (options)"
15
+ banner "knife zero bootstrap [SSH_USER@]FQDN (options)"
16
16
 
17
17
  ## Import from knife bootstrap except exclusions
18
18
  self.options = Bootstrap.options.merge(self.options)
19
19
  self.options.delete :node_ssl_verify_mode
20
20
  self.options.delete :node_verify_api_cert
21
21
 
22
- ## Override to use nil by default
22
+ ## Override to use nil by default. It should be create PR
23
23
  option :ssh_user,
24
24
  :short => "-x USERNAME",
25
25
  :long => "--ssh-user USERNAME"
@@ -31,41 +31,7 @@ class Chef
31
31
  :default => true,
32
32
  :proc => lambda { |v| Chef::Config[:knife][:bootstrap_converge] = v }
33
33
 
34
- ## monkey for #3900(included 12.5.2) >>
35
- if Gem::Version.new(Chef::VERSION) < Gem::Version.new('12.5.2')
36
- unless options.has_key?(:first_boot_attributes_from_file)
37
- option :first_boot_attributes_from_file,
38
- :long => "--json-attribute-file FILE",
39
- :description => "A JSON file to be used to the first run of chef-client",
40
- :proc => lambda { |o| Chef::JSONCompat.parse(File.read(o)) },
41
- :default => nil
42
-
43
- def first_boot_attributes
44
- @config[:first_boot_attributes] || @config[:first_boot_attributes_from_file] || {}
45
- end
46
-
47
- def render_template
48
- @config[:first_boot_attributes] = first_boot_attributes
49
- template_file = find_template
50
- template = IO.read(template_file).chomp
51
- Erubis::Eruby.new(template).evaluate(bootstrap_context)
52
- end
53
-
54
- ## monkey for #3900(included 12.5.2) <<
55
- end
56
- end
57
-
58
34
  def run
59
- ## monkey for #3900(included 12.5.2) >>
60
- if Gem::Version.new(Chef::VERSION) < Gem::Version.new('12.5.2')
61
- if @config[:first_boot_attributes] # Check for edge master
62
- if @config[:first_boot_attributes].any? && @config[:first_boot_attributes_from_file]
63
- raise "You cannot pass both --json-attributes and --json-attribute-file."
64
- end
65
- end
66
- end
67
- ## monkey for #3900(included 12.5.2) <<
68
-
69
35
  if @config[:first_boot_attributes_from_file]
70
36
  @config[:first_boot_attributes_from_file] = @config[:first_boot_attributes_from_file].merge(build_knifezero_attributes_for_node)
71
37
  else
@@ -84,7 +50,7 @@ class Chef
84
50
  ssh.ui = ui
85
51
  ssh.name_args = [ server_name, ssh_command ]
86
52
  ssh.config = Net::SSH.configuration_for(server_name)
87
- ssh.config[:ssh_user] = config[:ssh_user] || Chef::Config[:knife][:ssh_user]
53
+ ssh.config[:ssh_user] = user_name || config[:ssh_user] || Chef::Config[:knife][:ssh_user]
88
54
  ssh.config[:ssh_password] = config[:ssh_password]
89
55
  ssh.config[:ssh_port] = config[:ssh_port] || Chef::Config[:knife][:ssh_port]
90
56
  ssh.config[:ssh_gateway] = config[:ssh_gateway] || Chef::Config[:knife][:ssh_gateway]
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Zero
3
- VERSION = "1.10.2"
3
+ VERSION = "1.11.0"
4
4
  MAJOR, MINOR, TINY = VERSION.split('.')
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.2
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sawanoboly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-11 00:00:00.000000000 Z
11
+ date: 2015-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -140,16 +140,16 @@ dependencies:
140
140
  name: chef
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ">="
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '0'
145
+ version: 12.6.0
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ">="
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '0'
152
+ version: 12.6.0
153
153
  description: Run chef-client at remote node with chef-zero(local-mode) via HTTP over
154
154
  SSH port fowarding.
155
155
  email:
@@ -197,4 +197,3 @@ specification_version: 4
197
197
  summary: Run chef-client at remote node with chef-zero(local-mode) via HTTP over SSH
198
198
  port fowarding.
199
199
  test_files: []
200
- has_rdoc: