vagrant-1cloud 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 51e06d1a366eaca6fe67e6bb6590c710e3b41ac7
4
- data.tar.gz: 7b42cd84591d1a1718bb5b2f28e3ee41750e3316
3
+ metadata.gz: 5115e0f1eb3ef8924259a5e22818a31773170753
4
+ data.tar.gz: 54bc716c7ab7a3bcccbd06a2355df8f257863ebe
5
5
  SHA512:
6
- metadata.gz: f9ba06700f2e7e3d594d14724373910520153e8a482f508d374a723be2cb19c7c6353c6798c3436287708099c9d53264adcb45a4150061e8ec77ccb997ab7aa4
7
- data.tar.gz: 66453bbdb6816ec2408aa2cd94f77249841fb3fa8b0d9a7131cbea6de20e7e57315d0640f471ed0037fecfd2d2bef414fc2eca044be6be4c44057bc85034c771
6
+ metadata.gz: b5a5c0fa98081e1a2a86409c7f85c01b7f18747f56d8f1d62615bba5c73d1b9b956307cd2798e9370fcc6943b9e1a215af08a4916176b038910bbbb205ca4023
7
+ data.tar.gz: 8a5650ec33f398bf49766344096f501e2d2797793b3d52d6f7dcdd877a33f98c13adf17afd94a52245472a1d6636f2a851590c129053ad2fd6a98a6fc5c80afa
@@ -39,6 +39,7 @@ module VagrantPlugins
39
39
  # refresh droplet state with provider
40
40
  droplet = Provider.droplet(@machine, :refresh => true)
41
41
 
42
+ # add public key to machine
42
43
  path = @machine.config.ssh.private_key_path
43
44
  path = path[0] if path.is_a?(Array)
44
45
  path = File.expand_path(path, @machine.env.root_path)
@@ -58,6 +59,14 @@ module VagrantPlugins
58
59
  raise 'not ready' if !@machine.communicate.ready?
59
60
  end
60
61
 
62
+ # change host name
63
+ @machine.communicate.execute(<<-BASH)
64
+ sed -i -e "s/127.0.1.1.*/127.0.1.1\t#{@machine.config.vm.hostname}/" /etc/hosts
65
+ sed -i -e "s/#{droplet['IP']}.*/#{droplet['IP']}\t#{@machine.config.vm.hostname}/" /etc/hosts
66
+ echo #{@machine.config.vm.hostname} > /etc/hostname
67
+ hostname #{@machine.config.vm.hostname}
68
+ BASH
69
+
61
70
  @machine.config.ssh.username = user
62
71
 
63
72
  @app.call(env)
@@ -27,12 +27,17 @@ module VagrantPlugins
27
27
  # refresh droplet state with provider
28
28
  Provider.droplet(@machine, :refresh => true)
29
29
 
30
+ user = @machine.config.ssh.username
31
+ @machine.config.ssh.username = 'root'
32
+
30
33
  # wait for ssh to be ready
31
34
  retryable(:tries => 120, :sleep => 10) do
32
35
  next if env[:interrupted]
33
36
  raise 'not ready' if !@machine.communicate.ready?
34
37
  end
35
38
 
39
+ @machine.config.ssh.username = user
40
+
36
41
  @app.call(env)
37
42
  end
38
43
  end
@@ -57,6 +57,7 @@ module VagrantPlugins
57
57
 
58
58
  # set private network
59
59
  @machine.communicate.execute(<<-BASH)
60
+ echo >> /etc/network/interfaces
60
61
  ifconfig -a | grep #{linked_network['MAC']} | awk '{print "auto " $1}' >> /etc/network/interfaces
61
62
  ifconfig -a | grep #{linked_network['MAC']} | awk '{print "iface " $1 " inet static"}' >> /etc/network/interfaces
62
63
  echo "address #{@machine.provider_config.private_ip}" >> /etc/network/interfaces
@@ -24,12 +24,17 @@ module VagrantPlugins
24
24
  env[:ui].info I18n.t('vagrant_1cloud.info.reloading')
25
25
  @client.wait_for_event(env, @machine.id, result['body']['ID'])
26
26
 
27
+ user = @machine.config.ssh.username
28
+ @machine.config.ssh.username = 'root'
29
+
27
30
  # wait for ssh to be ready
28
31
  retryable(:tries => 120, :sleep => 10) do
29
32
  next if env[:interrupted]
30
33
  raise 'not ready' if !@machine.communicate.ready?
31
34
  end
32
35
 
36
+ @machine.config.ssh.username = user
37
+
33
38
  @app.call(env)
34
39
  end
35
40
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module OneCloud
3
- VERSION = '0.0.6'
3
+ VERSION = '0.0.7'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-1cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bulat Yusupov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-27 00:00:00.000000000 Z
11
+ date: 2017-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -60,7 +60,6 @@ extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
62
  - ".gitignore"
63
- - ".rake_tasks~"
64
63
  - Gemfile
65
64
  - LICENSE
66
65
  - Rakefile
data/.rake_tasks~ DELETED
@@ -1,4 +0,0 @@
1
- gem:build
2
- gem:install
3
- gem:install:local
4
- gem:release[remote]