vagrant-yarrs-and-yamls 0.8.1 → 0.8.3

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: 3f1d023f313997f8e4089d80ea241023e4ed7d48
4
- data.tar.gz: 8f4bc4ea829cc6bb194d0bd907ee92c97f6f5de0
3
+ metadata.gz: a918ed74556c378afe57f8a1a8d807944bacbfa3
4
+ data.tar.gz: 46859a0fd042be964bf93ce46b087500b60a45c8
5
5
  SHA512:
6
- metadata.gz: 083c1117e9bc38f345aeeabaf23ca0156b8c0cbf6b15b833c377ddd4107292805ba31a5452cfb785b8e2934461fe6a318d6f7bfa85db75eeb9d18d07ffe70bc9
7
- data.tar.gz: e59142f392a310e1a47b2c07cb46f3b05e33b8cb769b1fe4253aa9255cee430f07684601bd46c04e8f70f055ea86fae5925899736f1edb73a32a0790bce20464
6
+ metadata.gz: 2daa3e9d815ebc968534704992dba35fa2d35ffbfe9cb24c126ca9b699b6e9a3818eca9865a6c02a66814c966614bdf31f7fafa1666450dec69d7517a48461c1
7
+ data.tar.gz: 1d7dd82e506b350390207f47b6ddce504b2e2558a6431fddc7b0038c7e0674fa8e397ff8f22514d92f2defa198c6850d6a65cdff9b2a4da45b5b9db5d7f0d91c
data/.gitignore CHANGED
@@ -17,4 +17,6 @@ test/version_tmp
17
17
  tmp
18
18
  .idea
19
19
  *.swp
20
- .vagrant
20
+ .vagrant
21
+ *.yml
22
+ *.bak.*
data/example.Vagrantfile CHANGED
@@ -6,5 +6,11 @@
6
6
  # backwards compatibility). Please don't change it unless you know what
7
7
  # you're doing.
8
8
  Vagrant.configure(2) do |config|
9
- yarrs_and_yamls(config)
9
+ yarrs_and_yamls(config) do |hostname, settings|
10
+ config.vm.define hostname do |node|
11
+ #
12
+ # Add your settings to Vagrantfile.yml
13
+ #
14
+ end
15
+ end
10
16
  end
@@ -1,3 +1,7 @@
1
+ # Vagrantfile.yml accepts all values that normally go in Vagrantfile.
2
+ #
3
+ # For more information and examples, please see the online documentation at
4
+ # https://github.com/ptahdunbar/yarrs-and-yamls
1
5
  ---
2
6
  boxes:
3
7
  - hostname: vagrant
@@ -34,27 +34,27 @@ def yarrs_and_yamls(config=nil)
34
34
  end
35
35
 
36
36
  if box["synced_folders"]
37
- box["synced_folders"].each do |folder|
38
- node.vm.synced_folder folder[:host], folder[:guest], folder[:args]
39
- end
40
- end
41
-
42
- if box["ssh"]
43
- node.ssh.username = box["ssh"]["username"] if box["ssh"]["username"]
44
- node.ssh.password = box["ssh"]["password"] if box["ssh"]["password"]
45
- node.ssh.host = box["ssh"]["host"] if box["ssh"]["host"]
46
- node.ssh.port = box["ssh"]["port"] if box["ssh"]["port"]
47
- node.ssh.guest_port = box["ssh"]["guest_port"] if box["ssh"]["guest_port"]
48
- node.ssh.private_key_path = box["ssh"]["private_key_path"] if box["ssh"]["private_key_path"]
49
- node.ssh.forward_agent = box["ssh"]["forward_agent"] if box["ssh"]["forward_agent"]
50
- node.ssh.forward_x11 = box["ssh"]["forward_x11"] if box["ssh"]["forward_x11"]
51
- node.ssh.insert_key = box["ssh"]["insert_key"] if box["ssh"]["insert_key"]
52
- node.ssh.proxy_command = box["ssh"]["proxy_command"] if box["ssh"]["proxy_command"]
53
- node.ssh.pty = box["ssh"]["pty"] if box["ssh"]["pty"]
54
- node.ssh.shell = box["ssh"]["shell"] if box["ssh"]["shell"]
55
- end
56
-
57
- if box["provision"]
37
+ box["synced_folders"].each do |folder|
38
+ node.vm.synced_folder folder[:host], folder[:guest], folder[:args]
39
+ end
40
+ end
41
+
42
+ if box["ssh"]
43
+ node.ssh.username = box["ssh"]["username"] if box["ssh"]["username"]
44
+ node.ssh.password = box["ssh"]["password"] if box["ssh"]["password"]
45
+ node.ssh.host = box["ssh"]["host"] if box["ssh"]["host"]
46
+ node.ssh.port = box["ssh"]["port"] if box["ssh"]["port"]
47
+ node.ssh.guest_port = box["ssh"]["guest_port"] if box["ssh"]["guest_port"]
48
+ node.ssh.private_key_path = box["ssh"]["private_key_path"] if box["ssh"]["private_key_path"]
49
+ node.ssh.forward_agent = box["ssh"]["forward_agent"] if box["ssh"]["forward_agent"]
50
+ node.ssh.forward_x11 = box["ssh"]["forward_x11"] if box["ssh"]["forward_x11"]
51
+ node.ssh.insert_key = box["ssh"]["insert_key"] if box["ssh"]["insert_key"]
52
+ node.ssh.proxy_command = box["ssh"]["proxy_command"] if box["ssh"]["proxy_command"]
53
+ node.ssh.pty = box["ssh"]["pty"] if box["ssh"]["pty"]
54
+ node.ssh.shell = box["ssh"]["shell"] if box["ssh"]["shell"]
55
+ end
56
+
57
+ if box["provision"]
58
58
  box["provision"].each do |script|
59
59
  node.vm.provision "shell" do |s|
60
60
  s.inline = script["inline"] if script["inline"]
@@ -76,13 +76,13 @@ def yarrs_and_yamls(config=nil)
76
76
  end
77
77
 
78
78
  node.vm.provider :vmware_fusion do |vmware, override|
79
- override.vm.node_url = "http://files.vagrantup.com/precise64_vmware.node"
80
- vmware.gui = true if box["gui"]
81
- vmware.vmx["numvcpus"] = box["cpus"] if box["cpus"]
82
- vmware.vmx["memsize"] = box["cpus"] if box["memory"]
83
- end
79
+ override.vm.node_url = "http://files.vagrantup.com/precise64_vmware.node"
80
+ vmware.gui = true if box["gui"]
81
+ vmware.vmx["numvcpus"] = box["cpus"] if box["cpus"]
82
+ vmware.vmx["memsize"] = box["cpus"] if box["memory"]
83
+ end
84
84
 
85
- node.vm.provider :aws do |aws, override|
85
+ node.vm.provider :aws do |aws, override|
86
86
  if box["aws"]
87
87
  override.vm.box_url = "https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box"
88
88
 
@@ -138,6 +138,9 @@ def yarrs_and_yamls(config=nil)
138
138
  end
139
139
  end
140
140
  end
141
+
142
+ yield hostname, box if block_given?
143
+
141
144
  end
142
145
  end
143
146
 
@@ -150,7 +153,7 @@ def get_nodes(v=nil)
150
153
  next unless box["hostname"]
151
154
 
152
155
  boxes[box["hostname"]] = {}
153
-
156
+
154
157
  boxes[box["hostname"]]["box"] = v["box"] if v["box"]
155
158
  boxes[box["hostname"]]["box"] = box["box"] if box["box"]
156
159
  boxes[box["hostname"]]["box_check_update"] = box["box_check_update"] if box["box_check_update"]
@@ -178,7 +181,7 @@ def get_nodes(v=nil)
178
181
  boxes[box["hostname"]]["provision"].push(shell)
179
182
  end
180
183
  end
181
-
184
+
182
185
  if box["forwarded_ports"]
183
186
  boxes[box["hostname"]]["forwarded_ports"] ||= []
184
187
  box["forwarded_ports"].each do |item|
@@ -219,7 +222,7 @@ def get_nodes(v=nil)
219
222
 
220
223
  box["cpus"] = box["cpu"] if box["cpu"]
221
224
  boxes[box["hostname"]]["cpus"] = box["cpus"] if box["cpus"]
222
-
225
+
223
226
  boxes[box["hostname"]]["gui"] = box["gui"] if box["gui"]
224
227
  boxes[box["hostname"]]["disable_vm_optimization"] = box["disable_vm_optimization"] if box.include? "disable_vm_optimization"
225
228
 
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module YarrsAndYamls
3
- VERSION = '0.8.1'
3
+ VERSION = '0.8.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-yarrs-and-yamls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pirate Dunbar
@@ -22,7 +22,6 @@ files:
22
22
  - LICENSE.txt
23
23
  - README.md
24
24
  - Rakefile
25
- - Vagrantfile
26
25
  - example.Vagrantfile
27
26
  - example.Vagrantfile.yml
28
27
  - lib/vagrant-yarrs-and-yamls.rb
data/Vagrantfile DELETED
@@ -1,71 +0,0 @@
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 = "base"
16
-
17
- # Disable automatic box update checking. If you disable this, then
18
- # boxes will only be checked for updates when the user runs
19
- # `vagrant box outdated`. This is not recommended.
20
- # config.vm.box_check_update = false
21
-
22
- # Create a forwarded port mapping which allows access to a specific port
23
- # within the machine from a port on the host machine. In the example below,
24
- # accessing "localhost:8080" will access port 80 on the guest machine.
25
- # config.vm.network "forwarded_port", guest: 80, host: 8080
26
-
27
- # Create a private network, which allows host-only access to the machine
28
- # using a specific IP.
29
- # config.vm.network "private_network", ip: "192.168.33.10"
30
-
31
- # Create a public network, which generally matched to bridged network.
32
- # Bridged networks make the machine appear as another physical device on
33
- # your network.
34
- # config.vm.network "public_network"
35
-
36
- # Share an additional folder to the guest VM. The first argument is
37
- # the path on the host to the actual folder. The second argument is
38
- # the path on the guest to mount the folder. And the optional third
39
- # argument is a set of non-required options.
40
- # config.vm.synced_folder "../data", "/vagrant_data"
41
-
42
- # Provider-specific configuration so you can fine-tune various
43
- # backing providers for Vagrant. These expose provider-specific options.
44
- # Example for VirtualBox:
45
- #
46
- # config.vm.provider "virtualbox" do |vb|
47
- # # Display the VirtualBox GUI when booting the machine
48
- # vb.gui = true
49
- #
50
- # # Customize the amount of memory on the VM:
51
- # vb.memory = "1024"
52
- # end
53
- #
54
- # View the documentation for the provider you are using for more
55
- # information on available options.
56
-
57
- # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
58
- # such as FTP and Heroku are also available. See the documentation at
59
- # https://docs.vagrantup.com/v2/push/atlas.html for more information.
60
- # config.push.define "atlas" do |push|
61
- # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
62
- # end
63
-
64
- # Enable provisioning with a shell script. Additional provisioners such as
65
- # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
66
- # documentation for more information about their specific syntax and use.
67
- # config.vm.provision "shell", inline: <<-SHELL
68
- # sudo apt-get update
69
- # sudo apt-get install -y apache2
70
- # SHELL
71
- end