awsome 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/awsome/ec2/instance.rb +2 -2
- metadata +1 -1
data/lib/awsome/ec2/instance.rb
CHANGED
@@ -49,8 +49,8 @@ module Awsome
|
|
49
49
|
# we will remove all hosts entries for each of the given "hostnames"
|
50
50
|
sed += hostnames.collect { |h| "sed '/ #{h} /d'" }
|
51
51
|
|
52
|
-
cmd << "
|
53
|
-
cmd << "
|
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"
|
54
54
|
cmd << "sudo mv /etc/hosts.temp /etc/hosts"
|
55
55
|
ssh(cmd)
|
56
56
|
end
|