vagrant-kaigara 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: d4dca271dee3c55dd1816d3f2afe570b6ce7e939
4
- data.tar.gz: 0086c9947c860e1197f2a3dbd7479cedd7c9faaf
3
+ metadata.gz: 5df740381667e3aed83622c77b27bccfb5de3481
4
+ data.tar.gz: 3717c1b5467e6750d31a2979cd661d6aaba9dc9c
5
5
  SHA512:
6
- metadata.gz: ee684f3e8a98cc3764668c01f47aee384cb8f5d03e0ab819ea5aab544640ffa159dfd4ded6babf8afe4e9fba65a8c302415e873fc04cef40e734e12fbde740eb
7
- data.tar.gz: 3d8db8741371379a35b6b5752dd69eed9d9fe764efd0ecde77082970e656ffe1684c2aaf17c2a1e8457439ca197aa9877bd7222ddf72f26c94d314a22a45672a
6
+ metadata.gz: d86000c795a5c89c9bfa7369ee136523e9da663faade77b470f32c86fcc4477a3f09e4f79f3f07abd66a3b2ab636597b644ab1a957401dabcef048855d69e6ab
7
+ data.tar.gz: eab861e9ededd955a814f20596f224f88e7bfdf907f50d460deb44fcf402db6bb623bf5820575000aa5d03c42c2040495da26e5afccbcc18002a96687cde59f8
data/Vagrantfile ADDED
@@ -0,0 +1,72 @@
1
+ # -*- mode: ruby -*-
2
+ # vi: set ft=ruby :
3
+
4
+ # All Vagrant configuration is done below. The "2" in Vagrant.configure
5
+ # configures the configuration version (we support older styles for
6
+ # backwards compatibility). Please don't change it unless you know what
7
+ # you're doing.
8
+ Vagrant.configure(2) do |config|
9
+ # The most common configuration options are documented and commented below.
10
+ # For a complete reference, please see the online documentation at
11
+ # https://docs.vagrantup.com.
12
+
13
+ # Every Vagrant development environment requires a box. You can search for
14
+ # boxes at https://atlas.hashicorp.com/search.
15
+ config.vm.box = "debian/jessie64"
16
+ config.vm.provision "kaigara"
17
+
18
+ # Disable automatic box update checking. If you disable this, then
19
+ # boxes will only be checked for updates when the user runs
20
+ # `vagrant box outdated`. This is not recommended.
21
+ # config.vm.box_check_update = false
22
+
23
+ # Create a forwarded port mapping which allows access to a specific port
24
+ # within the machine from a port on the host machine. In the example below,
25
+ # accessing "localhost:8080" will access port 80 on the guest machine.
26
+ # config.vm.network "forwarded_port", guest: 80, host: 8080
27
+
28
+ # Create a private network, which allows host-only access to the machine
29
+ # using a specific IP.
30
+ # config.vm.network "private_network", ip: "192.168.33.10"
31
+
32
+ # Create a public network, which generally matched to bridged network.
33
+ # Bridged networks make the machine appear as another physical device on
34
+ # your network.
35
+ # config.vm.network "public_network"
36
+
37
+ # Share an additional folder to the guest VM. The first argument is
38
+ # the path on the host to the actual folder. The second argument is
39
+ # the path on the guest to mount the folder. And the optional third
40
+ # argument is a set of non-required options.
41
+ # config.vm.synced_folder "../data", "/vagrant_data"
42
+
43
+ # Provider-specific configuration so you can fine-tune various
44
+ # backing providers for Vagrant. These expose provider-specific options.
45
+ # Example for VirtualBox:
46
+ #
47
+ # config.vm.provider "virtualbox" do |vb|
48
+ # # Display the VirtualBox GUI when booting the machine
49
+ # vb.gui = true
50
+ #
51
+ # # Customize the amount of memory on the VM:
52
+ # vb.memory = "1024"
53
+ # end
54
+ #
55
+ # View the documentation for the provider you are using for more
56
+ # information on available options.
57
+
58
+ # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
59
+ # such as FTP and Heroku are also available. See the documentation at
60
+ # https://docs.vagrantup.com/v2/push/atlas.html for more information.
61
+ # config.push.define "atlas" do |push|
62
+ # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
63
+ # end
64
+
65
+ # Enable provisioning with a shell script. Additional provisioners such as
66
+ # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
67
+ # documentation for more information about their specific syntax and use.
68
+ # config.vm.provision "shell", inline: <<-SHELL
69
+ # sudo apt-get update
70
+ # sudo apt-get install -y apache2
71
+ # SHELL
72
+ end
@@ -10,24 +10,28 @@ module VagrantPlugins
10
10
  @machine.ui.info("Ruby is already installed")
11
11
  else
12
12
  @machine.ui.info("Installing Ruby...")
13
- action("curl http://mirror.kaigara.org/scripts/kairb.sh | bash /dev/stdin")
13
+ action("curl -s http://mirror.kaigara.org/scripts/kairb.sh | bash -s")
14
14
  end
15
15
 
16
16
  if kaigara_installed?
17
17
  @machine.ui.info("Kaigara is already installed")
18
18
  else
19
19
  @machine.ui.info("Installing Kaigara...")
20
- action("gem install kaigara")
20
+ action("/opt/kaigara/bin/gem install kaigara")
21
21
  end
22
22
 
23
23
  @machine.ui.info("Provisioning...")
24
- action("cd /vagrant && kaish sysops exec")
24
+ if File.exist?('/vagrant/metadata.rb')
25
+ action("cd /vagrant && /opt/kaigara/bin/kaish sysops exec")
26
+ else
27
+ @machine.ui.info("No operations found")
28
+ end
25
29
  end
26
30
 
27
31
  # Execute a command at vm
28
32
  def action(command, opts = {})
29
33
  @machine.communicate.tap do |comm|
30
- comm.execute("source /etc/profile; #{command}", { error_key: :ssh_bad_exit_status_muted, sudo: true }.merge(opts) ) do |type, data|
34
+ comm.execute(command, { error_key: :ssh_bad_exit_status_muted, sudo: true }.merge(opts) ) do |type, data|
31
35
  handle_comm(type, data)
32
36
  end
33
37
  end
@@ -44,9 +48,7 @@ module VagrantPlugins
44
48
  options = {}
45
49
  options[:color] = color
46
50
 
47
- Thread.new do
48
- @machine.ui.info(data.chomp.strip, options) if data.chomp.length > 1
49
- end
51
+ @machine.ui.info(data.chomp.strip, options) if data.chomp.length > 1
50
52
  end
51
53
  end
52
54
 
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Kaigara
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-kaigara
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
  - Dmitry Koval
@@ -52,6 +52,7 @@ files:
52
52
  - LICENSE.txt
53
53
  - README.md
54
54
  - Rakefile
55
+ - Vagrantfile
55
56
  - bin/console
56
57
  - bin/setup
57
58
  - lib/vagrant-kaigara.rb