cloud66_agent 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/cloud66_agent/utils/version.rb +1 -1
- data/lib/cloud66_agent/utils/vital_signs.rb +4 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NGE3ZDc4YjdjMjM0ZDI4MDI4OTI1NGY1NTA5ZWEwYTg3MzFiZGFhMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzdlOGVmNTRmMjljNzI5NDFiZDEwMWE2Y2NlOTUxNWIzM2UwMGY5ZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzJmNzJmOTg1YzQxNTJlODQyNzA0NzZjYzA4ODJjMDNkZjhiNTQwNWY2Y2Vk
|
10
|
+
Nzc0NWJhZDc4NDdlN2NjZTNkZTg2ZDMxYzI5ZjcxNTFiOTYzYzRjMWJmNzhk
|
11
|
+
MGZhYjU4MWY0MDlmOWFmMTg1ZTFjNTgxNTk0MTM2NTg1MjFkNmU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NGJkNjY3YzAwZDBhNjY3MjdkODBhMzdiMWM5MWU5Yjc0NGMzMWZiYTJmMTA3
|
14
|
+
MzQ2NjQ4OTc2MzUzNmZkYWZjMGIxMzJjMDIwY2M5NTllZmFiZTA4Njk5ZmQy
|
15
|
+
YmU3NzJjZmYzNDJlYzBkNmQzMTNjYjRjNjk2ZGJiODRmNDU5ZjQ=
|
@@ -8,19 +8,22 @@ module Cloud66
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def self.address_info
|
11
|
-
result = {}
|
12
11
|
# AWS special case
|
13
12
|
if $config.is_aws
|
13
|
+
result = {}
|
14
14
|
reported_ip = `/usr/bin/curl -s http://169.254.169.254/latest/meta-data/public-ipv4`
|
15
15
|
result[:ext_ipv4] = reported_ip if reported_ip =~ /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/
|
16
16
|
reported_ip = `/usr/bin/curl -s http://169.254.169.254/latest/meta-data/local-ipv4`
|
17
17
|
result[:int_ipv4] = reported_ip if reported_ip =~ /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/
|
18
|
+
return result
|
18
19
|
# GC special case
|
19
20
|
elsif $config.is_gc
|
21
|
+
result = {}
|
20
22
|
external_ip = `/usr/bin/curl -s -H "Metadata-Flavor: Google" http://metadata/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip`
|
21
23
|
result[:ext_ipv4] = external_ip if external_ip =~ /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/
|
22
24
|
internal_ip = `/usr/bin/curl -s -H "Metadata-Flavor: Google" http://metadata/computeMetadata/v1/instance/network-interfaces/0/ip`
|
23
25
|
result[:int_ipv4] = internal_ip if internal_ip =~ /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/
|
26
|
+
return result
|
24
27
|
else
|
25
28
|
interfaces_raw = `facter interfaces`
|
26
29
|
interfaces = interfaces_raw.split(',').select { |interface| interface =~ /^eth/ }
|