lisausa-knife-plugins 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/chef/knife/setup_ssh.rb +7 -1
- data/lib/lisausa_knife_plugins.rb +1 -1
- metadata +4 -4
data/lib/chef/knife/setup_ssh.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require_relative '../../core_ext'
|
2
2
|
require 'chef/knife'
|
3
|
+
require 'pry'
|
3
4
|
|
4
5
|
class LisausaKnifePlugins::SetupSsh < ::Chef::Knife
|
5
6
|
banner 'knife setup ssh'
|
@@ -17,9 +18,14 @@ class LisausaKnifePlugins::SetupSsh < ::Chef::Knife
|
|
17
18
|
name = n.name
|
18
19
|
name << '.lisausa.net' unless /\.lisausa.net\Z/.match(n.name)
|
19
20
|
|
21
|
+
begin
|
22
|
+
hostname = n.ipaddress
|
23
|
+
rescue
|
24
|
+
hostname = nil
|
25
|
+
end
|
20
26
|
config << <<-END.strip_heredoc
|
21
27
|
Host #{name}
|
22
|
-
HostName #{
|
28
|
+
HostName #{hostname}
|
23
29
|
END
|
24
30
|
end
|
25
31
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lisausa-knife-plugins
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
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:
|
12
|
+
date: 2013-01-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: chef
|
@@ -74,7 +74,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
74
74
|
version: '0'
|
75
75
|
segments:
|
76
76
|
- 0
|
77
|
-
hash: -
|
77
|
+
hash: -374341338581459933
|
78
78
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
79
|
none: false
|
80
80
|
requirements:
|
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
83
|
version: '0'
|
84
84
|
segments:
|
85
85
|
- 0
|
86
|
-
hash: -
|
86
|
+
hash: -374341338581459933
|
87
87
|
requirements: []
|
88
88
|
rubyforge_project:
|
89
89
|
rubygems_version: 1.8.23
|