awsome 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/awsome/ec2/instance.rb +2 -2
  2. metadata +1 -1
@@ -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 << "sudo cat /etc/hosts | #{sed.join(' | ')} > /etc/hosts.temp"
53
- cmd << "sudo echo '#{ip_address} #{hostnames.join(' ')} # GENERATED' >> /etc/hosts.temp"
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awsome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: