runpuppet 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/runpuppet.rb +11 -1
- data/runpuppet.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.5
|
data/lib/runpuppet.rb
CHANGED
@@ -102,7 +102,17 @@ class Runpuppet
|
|
102
102
|
end
|
103
103
|
|
104
104
|
def self.local_ip
|
105
|
-
|
105
|
+
if is_ec2?
|
106
|
+
require 'facter/application'
|
107
|
+
res = Facter::Application.run(ARGV)
|
108
|
+
ip = res.find{|x| x[0] == 'ec2_public_ipv4'}[1]
|
109
|
+
else
|
110
|
+
%x(ifconfig)[/192.168.\d+.\d+/] || config['local_ip']
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
def self.is_ec2?
|
115
|
+
%x(arp -n) =~ /fe:ff:ff:ff:ff/
|
106
116
|
end
|
107
117
|
end
|
108
118
|
end
|
data/runpuppet.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runpuppet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 5
|
10
|
+
version: 0.5.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Roman Heinrich
|