vagrant-kaigara 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vagrant-kaigara/provisioner.rb +12 -21
- data/lib/vagrant-kaigara/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e5fb579fc12e80bc10b03729f40ae9bb891d3bb
|
4
|
+
data.tar.gz: 39f80f4604b68e1c842119fc6b7a43e8aa903d0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b52711ad1f2487d36701a9d069356206b335bbd316f753819ee1ffa3d895ed8a1d22d6a5c5137afc78b51cf7fa737dc784eb1fa59e5423e33f41a126c2d8006
|
7
|
+
data.tar.gz: bff6ea19b676c04397a6ad71150a281ac82e662ad13b835e61e9e54fc93d2a5a44a0cfa533efd49e4c4a2f5e73355e31b282fb58aa09696c53fa96dcb617f3d1
|
@@ -6,22 +6,11 @@ module VagrantPlugins
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def provision
|
9
|
-
if
|
10
|
-
@machine.ui.info("
|
9
|
+
if ruby_installed?
|
10
|
+
@machine.ui.info("Ruby is already installed")
|
11
11
|
else
|
12
|
-
@machine.ui.info("Installing
|
13
|
-
|
14
|
-
install_rvm = %{
|
15
|
-
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
|
16
|
-
curl -L get.rvm.io | sudo bash -s stable
|
17
|
-
rvm use --default --install ruby-2.3
|
18
|
-
gpasswd -a vagrant rvm
|
19
|
-
}
|
20
|
-
|
21
|
-
install_rvm.strip.each_line do |l|
|
22
|
-
@machine.ui.info(l.strip)
|
23
|
-
action(l)
|
24
|
-
end
|
12
|
+
@machine.ui.info("Installing Ruby...")
|
13
|
+
@machine.ui.info("curl http://mirror.kaigara.org/scripts/kairb.sh | bash /dev/stdin")
|
25
14
|
end
|
26
15
|
|
27
16
|
if kaigara_installed?
|
@@ -33,15 +22,15 @@ module VagrantPlugins
|
|
33
22
|
|
34
23
|
@machine.ui.info("Provisioning...")
|
35
24
|
action("cd /vagrant && kaish sysops exec")
|
36
|
-
|
37
|
-
action("echo 'source /etc/profile' >> /root/.bashrc")
|
38
25
|
end
|
39
26
|
|
40
27
|
# Execute a command at vm
|
41
28
|
def action(command, opts = {})
|
42
29
|
@machine.communicate.tap do |comm|
|
43
30
|
comm.execute(command, { error_key: :ssh_bad_exit_status_muted, sudo: true }.merge(opts) ) do |type, data|
|
44
|
-
|
31
|
+
Thread.new do
|
32
|
+
handle_comm(type, data)
|
33
|
+
end
|
45
34
|
end
|
46
35
|
end
|
47
36
|
end
|
@@ -57,12 +46,14 @@ module VagrantPlugins
|
|
57
46
|
options = {}
|
58
47
|
options[:color] = color
|
59
48
|
|
60
|
-
|
49
|
+
Thread.new do
|
50
|
+
@machine.ui.info(data.chomp.strip, options) if data.chomp.length > 1
|
51
|
+
end
|
61
52
|
end
|
62
53
|
end
|
63
54
|
|
64
|
-
def
|
65
|
-
@machine.communicate.test('
|
55
|
+
def ruby_installed?
|
56
|
+
@machine.communicate.test('ruby -v', sudo: true)
|
66
57
|
end
|
67
58
|
|
68
59
|
def kaigara_installed?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-kaigara
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Koval
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|