Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: Vagrantfile

Issue 9193009: Set up multi VM test environment (Closed)
Left Patch Set: Created Jan. 14, 2013, 1:45 p.m.
Right Patch Set: Make the block optional Created Jan. 14, 2013, 4:15 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 Vagrant::Config.run do |config| 1 def define_standard_vm(config, name, address)
2 config.vm.define :webserver do |config| 2 config.vm.define name do |config|
3 config.vm.box = "precise64" 3 config.vm.box = 'precise64'
4 config.vm.box_url = "http://files.vagrantup.com/precise64.box" 4 config.vm.box_url = 'http://files.vagrantup.com/precise64.box'
5 config.vm.network :hostonly, "10.8.0.97" 5 config.vm.network :hostonly, address
6 6
7 config.vm.provision :puppet do |puppet| 7 config.vm.provision :puppet do |puppet|
8 puppet.manifests_path = 'manifests' 8 puppet.manifests_path = 'manifests'
9 puppet.manifest_file = 'webserver.pp' 9 puppet.manifest_file = name.to_s() + '.pp'
10 puppet.module_path = 'modules' 10 puppet.module_path = 'modules'
11 end 11 end
12 12
13 local_anwiki_repository = "../anwiki" 13 yield(config) if block_given?
14 end
15
16 end
17
18 Vagrant::Config.run do |config|
19 define_standard_vm config, :webserver, '10.8.0.97' do |config|
20 local_anwiki_repository = '../anwiki'
14 if File.directory?(local_anwiki_repository) 21 if File.directory?(local_anwiki_repository)
15 config.vm.share_folder("local_anwiki_repository", 22 config.vm.share_folder('local_anwiki_repository',
16 "/mnt/local_anwiki_repository", local_anwiki_repository) 23 '/mnt/local_anwiki_repository', local_anwiki_repository)
17 end 24 end
18 end 25 end
19 end 26 end
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld