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

Side by Side Diff: Vagrantfile

Issue 6269682487132160: Issue 2151 - Drop hiera/private in favor of modules/private/hiera (Closed)
Patch Set: Created March 17, 2015, 9:06 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 require 'yaml' 1 require 'yaml'
2 2
3 VAGRANTFILE_API_VERSION = "2" 3 VAGRANTFILE_API_VERSION = "2"
4 REPOSITORY_DIR = File.dirname(__FILE__) 4 REPOSITORY_DIR = File.dirname(__FILE__)
5 DEPENDENCY_SCRIPT = File.join(REPOSITORY_DIR, "ensure_dependencies.py") 5 DEPENDENCY_SCRIPT = File.join(REPOSITORY_DIR, "ensure_dependencies.py")
6 6
7 if !system("python", DEPENDENCY_SCRIPT) 7 if !system("python", DEPENDENCY_SCRIPT)
8 error = Vagrant::Errors::VagrantError 8 error = Vagrant::Errors::VagrantError
9 error.error_message("Failed to ensure dependencies being up-to-date!") 9 error.error_message("Failed to ensure dependencies being up-to-date!")
10 raise error 10 raise error
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 puppet.manifests_path = 'manifests' 50 puppet.manifests_path = 'manifests'
51 puppet.manifest_file = 'nodes.pp' 51 puppet.manifest_file = 'nodes.pp'
52 puppet.module_path = 'modules' 52 puppet.module_path = 'modules'
53 end 53 end
54 54
55 yield(config) if block_given? 55 yield(config) if block_given?
56 end 56 end
57 end 57 end
58 58
59 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 59 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
60 config_path = File.join(REPOSITORY_DIR, "hiera/private/hosts.yaml") 60 config_path = File.join(REPOSITORY_DIR, "modules/private/hiera/hosts.yaml")
61 config_data = YAML.load_file(config_path) 61 config_data = YAML.load_file(config_path)
62 servers = config_data["servers"] 62 servers = config_data["servers"]
63 servers.each do |server, items| 63 servers.each do |server, items|
64 ip = items["ip"][0] 64 ip = items["ip"][0]
65 role = items.fetch("role", "default") 65 role = items.fetch("role", "default")
66 define_standard_vm(config, server, ip, role) 66 define_standard_vm(config, server, ip, role)
67 end 67 end
68 end 68 end
OLDNEW
« no previous file with comments | « README.md ('k') | hiera/hiera.yaml » ('j') | hiera/install_precise.py » ('J')

Powered by Google App Engine
This is Rietveld