Created
April 17, 2013 13:20
-
-
Save nagas/5404239 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SUBNET='192.168.45' | |
DOMAIN='local' | |
INSTANCES=1 | |
Vagrant.configure("2") do |config| | |
config.hostmanager.ignore_private_ip = false | |
config.vm.define "puppet-master".to_sym do |node| | |
node.hostmanager.aliases = %W(puppet-master-alias puppet-master-alias.localdomain) | |
node.hostmanager.auto_update = true | |
node.vm.box = "c6_puppet_master" | |
node.vm.network :private_network, ip: "#{SUBNET}.2" | |
node.vm.hostname = "puppet-master.#{DOMAIN}" | |
node.vm.provision :puppet do |puppet| | |
puppet.facter = { | |
"subnet" => SUBNET | |
} | |
end | |
end | |
INSTANCES.times do |i| | |
config.vm.define "puppet-client#{i}".to_sym do |node| | |
node.hostmanager.aliases = %W(puppet-client#{i}-alias puppet-client#{i}-alias.localdomain) | |
node.vm.box = "c6_puppet_client" | |
node.vm.network :private_network, ip: "#{SUBNET}.%d" % ( 3 + i ) | |
node.vm.hostname = "puppet-client%d.#{DOMAIN}" % i | |
node.vm.provision :puppet do |puppet| | |
puppet.facter = { | |
"subnet" => SUBNET | |
} | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment