Browse Source

Fix trailing whitespace in Vagrantfile

Also replace the global variable with a local one
Greg Karékinian 11 years ago
parent
commit
ba3b812bf9
1 changed files with 14 additions and 15 deletions
  1. 14
    15
      Vagrantfile

+ 14
- 15
Vagrantfile View File

1
 # The following patch needs to be applied for ansible to run cleanly on vagrant up:
1
 # The following patch needs to be applied for ansible to run cleanly on vagrant up:
2
 # https://github.com/mitchellh/vagrant/pull/1723.diff on /opt/vagrant/embedded/gems/gems/vagrant-1.2.x
2
 # https://github.com/mitchellh/vagrant/pull/1723.diff on /opt/vagrant/embedded/gems/gems/vagrant-1.2.x
3
 
3
 
4
-$boxes = [
5
-  {
6
-    :name => 'ansible.local',
7
-    :forwards => { 22  => 22222,
8
-                   80  => 80,
9
-                   25  => 25,
10
-                   143 => 143,
11
-                   465 => 465,
12
-                   993 => 993 
13
-    }
14
-  }
15
-]
16
-
17
 Vagrant.configure('2') do |config|
4
 Vagrant.configure('2') do |config|
18
   config.vm.provider :lxc do |lxc, override|
5
   config.vm.provider :lxc do |lxc, override|
19
     override.vm.box     = 'precise64'
6
     override.vm.box     = 'precise64'
25
     override.vm.box_url = 'http://files.vagrantup.com/precise64.box'
12
     override.vm.box_url = 'http://files.vagrantup.com/precise64.box'
26
   end
13
   end
27
 
14
 
28
-  $boxes.each do |opts| 
15
+  boxes = [
16
+    {
17
+      :name => 'ansible.local',
18
+      :forwards => { 22  => 22222,
19
+                     80  => 80,
20
+                     25  => 25,
21
+                     143 => 143,
22
+                     465 => 465,
23
+                     993 => 993 }
24
+    }
25
+  ]
26
+
27
+  boxes.each do |opts|
29
     config.vm.hostname = opts[:name]
28
     config.vm.hostname = opts[:name]
30
 
29
 
31
     opts[:forwards].each do |guest_port, host_port|
30
     opts[:forwards].each do |guest_port, host_port|
38
     config.vm.provision :ansible do |ansible|
37
     config.vm.provision :ansible do |ansible|
39
       ansible.playbook = 'site.yml'
38
       ansible.playbook = 'site.yml'
40
     end
39
     end
41
-    
40
+
42
     config.vm.provision :shell,
41
     config.vm.provision :shell,
43
                         :inline => "echo [test] > /vagrant/hosts.autogen && ifconfig eth0 | grep 'inet addr' | awk '{print $2}' | cut -d: -f2 >> /vagrant/hosts.autogen"
42
                         :inline => "echo [test] > /vagrant/hosts.autogen && ifconfig eth0 | grep 'inet addr' | awk '{print $2}' | cut -d: -f2 >> /vagrant/hosts.autogen"
44
   end
43
   end

Loading…
Cancel
Save