knife-setup 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/chef/knife/knife-setup.rb +8 -4
- data/lib/knife-setup/version.rb +1 -1
- metadata +3 -2
@@ -142,9 +142,9 @@ class Chef
|
|
142
142
|
end
|
143
143
|
|
144
144
|
def get_node
|
145
|
-
node = Chef::Node.load(
|
145
|
+
node = Chef::Node.load(server_name)
|
146
146
|
if node.nil?
|
147
|
-
ui.error("Could not find a node named #{@
|
147
|
+
ui.error("Could not find a node named #{@server_name}")
|
148
148
|
exit 1
|
149
149
|
end
|
150
150
|
return node
|
@@ -199,13 +199,17 @@ class Chef
|
|
199
199
|
end
|
200
200
|
|
201
201
|
def server_name
|
202
|
-
|
202
|
+
if config[:chef_node_name].empty?
|
203
|
+
Array(@name_args).first
|
204
|
+
else
|
205
|
+
config[:chef_node_name]
|
206
|
+
end
|
203
207
|
end
|
204
208
|
|
205
209
|
def knife_ssh(command)
|
206
210
|
ssh = Chef::Knife::Ssh.new
|
207
211
|
ssh.ui = ui
|
208
|
-
ssh.name_args = [
|
212
|
+
ssh.name_args = [ @node_name, command]
|
209
213
|
ssh.config[:ssh_user] = config[:ssh_user]
|
210
214
|
ssh.config[:ssh_password] = config[:ssh_password]
|
211
215
|
ssh.config[:ssh_port] = Chef::Config[:knife][:ssh_port] || config[:ssh_port]
|
data/lib/knife-setup/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-setup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-03-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: chef
|
@@ -66,3 +66,4 @@ signing_key:
|
|
66
66
|
specification_version: 3
|
67
67
|
summary: Setup chef on machine.
|
68
68
|
test_files: []
|
69
|
+
has_rdoc:
|