cloud66_agent 1.0.7.pre1 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
@@ -12,16 +12,14 @@ module Cloud66
|
|
12
12
|
|
13
13
|
def self.address_info
|
14
14
|
# address information
|
15
|
-
hash = parse_data(`facter ipaddress ipaddress_eth0 ipaddress6 ipaddress6_eth0
|
15
|
+
hash = parse_data(`facter ipaddress ec2_public_ipv4 ipaddress_eth0 ipaddress6 ipaddress6_eth0`)
|
16
16
|
|
17
17
|
result = {}
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
else
|
24
|
-
# set general external ip address
|
18
|
+
if hash.has_key?('ec2_public_ipv4')
|
19
|
+
# return ec2 info first (most specific)
|
20
|
+
result[:ext_ipv4] = hash['ec2_public_ipv4']
|
21
|
+
elsif hash.has_key?('ipaddress')
|
22
|
+
# return ip address next (general)
|
25
23
|
result[:ext_ipv4] = hash['ipaddress']
|
26
24
|
end
|
27
25
|
result[:int_ipv4] = hash['ipaddress_eth0'] if hash.has_key?('ipaddress_eth0')
|
@@ -29,7 +27,7 @@ module Cloud66
|
|
29
27
|
result[:int_ipv6] = hash['ipaddress6_eth0'] if hash.has_key?('ipaddress6_eth0')
|
30
28
|
|
31
29
|
# don't have any ip address info
|
32
|
-
raise
|
30
|
+
raise "no address information" if result.empty? || !result.has_key?(:ext_ipv4)
|
33
31
|
|
34
32
|
# return ip address info
|
35
33
|
return result
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloud66_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.7
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.7
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Cloud 66
|
@@ -151,9 +151,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
151
151
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
152
|
none: false
|
153
153
|
requirements:
|
154
|
-
- - ! '
|
154
|
+
- - ! '>='
|
155
155
|
- !ruby/object:Gem::Version
|
156
|
-
version:
|
156
|
+
version: '0'
|
157
157
|
requirements: []
|
158
158
|
rubyforge_project:
|
159
159
|
rubygems_version: 1.8.25
|