awsome 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|