awsome 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/awsome/ec2/instance.rb +1 -1
- metadata +1 -1
data/lib/awsome/ec2/instance.rb
CHANGED
@@ -50,7 +50,7 @@ module Awsome
|
|
50
50
|
sed += hostnames.collect { |h| "sed '/ #{h} /d'" }
|
51
51
|
|
52
52
|
cmd << "cat /etc/hosts | #{sed.join(' | ')} | sudo tee /etc/hosts.temp"
|
53
|
-
cmd << "echo '#{ip_address} #{hostnames.join(' ')} # GENERATED' | sudo tee -a /etc/hosts.temp"
|
53
|
+
cmd << "echo '#{ip_address} #{hostnames.join(' ')} # GENERATED' | sudo tee -a /etc/hosts.temp" unless hostnames.empty?
|
54
54
|
cmd << "sudo mv /etc/hosts.temp /etc/hosts"
|
55
55
|
ssh(cmd)
|
56
56
|
end
|