knife-zero 2.0.0.rc1 → 2.0.0
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 +4 -4
- data/CHANGELOG.md +1 -0
- data/README.md +8 -0
- data/lib/chef/knife/zero_apply.rb +17 -0
- data/lib/chef/knife/zero_base.rb +1 -1
- data/lib/chef/knife/zero_bootstrap.rb +1 -2
- data/lib/chef/knife/zero_converge.rb +17 -0
- data/lib/chef/knife/zero_diagnose.rb +0 -1
- data/lib/knife-zero/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28702dd9c432d13e8dbd122ab8e4fe98451181d28f814f166ca863e8679d9a0e
|
4
|
+
data.tar.gz: e8f3fe9460bde789dd575e382d2369d5df15ede8ce848045efa29f4a76216e9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b07d56e44c7eee303904307d7631e66dde820a98d04b05a5898a3de051d0e336a0f42aa0ea11c6a1d480e55cb17de5be641cb7dbbc1427c565398d3aba02aff3
|
7
|
+
data.tar.gz: c235442c8f1268305091a90dc59eec2c8b80930e6a0bc0da890a03796c7c2378855df272a4a8e462ed32ee09e014fcc279b80467ffda4e3cf1ed8be46a338dcf
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -24,6 +24,14 @@ Run chef-client at remote node with chef-zero(local-mode) via HTTP over SSH port
|
|
24
24
|
- Ruby 2.5 or later
|
25
25
|
- Must support AllowTcpForward
|
26
26
|
|
27
|
+
### 2.0.0 or later
|
28
|
+
|
29
|
+
- Chef Infra Client 15.x for bootstraping.
|
30
|
+
|
31
|
+
### 1.x
|
32
|
+
|
33
|
+
- Chef < 15.0
|
34
|
+
|
27
35
|
## Installation
|
28
36
|
|
29
37
|
Relocated: [Installation | Knife-Zero Document](http://knife-zero.github.io/10_install/)
|
@@ -35,6 +35,23 @@ class Chef
|
|
35
35
|
self.options[:json_attribs] = Chef::Application::Apply.options[:json_attribs]
|
36
36
|
self.options[:json_attribs][:description] = 'Load attributes from a JSON file or URL (retrieves from the remote node)'
|
37
37
|
|
38
|
+
# Common connectivity options for compatibility
|
39
|
+
option :connection_user,
|
40
|
+
short: '-U USERNAME',
|
41
|
+
long: '--connection-user USERNAME',
|
42
|
+
description: 'Authenticate to the target host with this user account. (same as --ssh-user)',
|
43
|
+
proc: lambda { |v| Chef::Config[:knife][:ssh_user] = v }
|
44
|
+
|
45
|
+
option :connection_password,
|
46
|
+
long: '--connection-password PASSWORD',
|
47
|
+
description: 'Authenticate to the target host with this password. (same as --ssh-password)',
|
48
|
+
proc: lambda { |v| Chef::Config[:knife][:ssh_password_ng] = v }
|
49
|
+
|
50
|
+
option :connection_port,
|
51
|
+
long: '--connection-port PORT',
|
52
|
+
description: 'The port on the target node to connect to. (same as --ssh-port)',
|
53
|
+
proc: lambda { |v| Chef::Config[:knife][:ssh_port] = v }
|
54
|
+
|
38
55
|
def initialize(argv = [])
|
39
56
|
super
|
40
57
|
self.configure_chef
|
data/lib/chef/knife/zero_base.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'chef/knife'
|
2
|
-
require 'chef/knife/bootstrap'
|
3
2
|
require 'chef/knife/zero_base'
|
4
3
|
|
5
4
|
class Chef
|
@@ -60,7 +59,7 @@ class Chef
|
|
60
59
|
q = Chef::Search::Query.new
|
61
60
|
node_name = resolve_node_name
|
62
61
|
result = q.search(:node, "name:#{node_name} OR knife_zero_host:#{node_name}")
|
63
|
-
if result.last
|
62
|
+
if result.last.positive?
|
64
63
|
ui.warn(%{Node "#{node_name}" already exist. [Found #{result.last} Node(s) in local search.] (You can skip asking with --overwrite option.)})
|
65
64
|
if result.last == 1
|
66
65
|
ui.confirm(%{Overwrite it }, true, false)
|
@@ -73,6 +73,23 @@ class Chef
|
|
73
73
|
end
|
74
74
|
}
|
75
75
|
|
76
|
+
# Common connectivity options for compatibility
|
77
|
+
option :connection_user,
|
78
|
+
short: '-U USERNAME',
|
79
|
+
long: '--connection-user USERNAME',
|
80
|
+
description: 'Authenticate to the target host with this user account. (same as --ssh-user)',
|
81
|
+
proc: lambda { |v| Chef::Config[:knife][:ssh_user] = v }
|
82
|
+
|
83
|
+
option :connection_password,
|
84
|
+
long: '--connection-password PASSWORD',
|
85
|
+
description: 'Authenticate to the target host with this password. (same as --ssh-password)',
|
86
|
+
proc: lambda { |v| Chef::Config[:knife][:ssh_password_ng] = v }
|
87
|
+
|
88
|
+
option :connection_port,
|
89
|
+
long: '--connection-port PORT',
|
90
|
+
description: 'The port on the target node to connect to. (same as --ssh-port)',
|
91
|
+
proc: lambda { |v| Chef::Config[:knife][:ssh_port] = v }
|
92
|
+
|
76
93
|
def initialize(argv = [])
|
77
94
|
super
|
78
95
|
self.configure_chef
|
data/lib/knife-zero/version.rb
CHANGED
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: 2.0.0
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sawanoboly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -188,9 +188,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
188
188
|
version: 2.5.0
|
189
189
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
190
190
|
requirements:
|
191
|
-
- - "
|
191
|
+
- - ">="
|
192
192
|
- !ruby/object:Gem::Version
|
193
|
-
version:
|
193
|
+
version: '0'
|
194
194
|
requirements: []
|
195
195
|
rubyforge_project:
|
196
196
|
rubygems_version: 2.7.6
|