Skip to content

Instantly share code, notes, and snippets.

@malnick
Created January 24, 2014 00:08
Show Gist options
  • Save malnick/8589511 to your computer and use it in GitHub Desktop.
Save malnick/8589511 to your computer and use it in GitHub Desktop.
-*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "centos-64-x64-nocm"
config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-fusion503-nocm.box"
config.pe_build.version = '3.1.0'
config.pe_build.download_root = 'https://s3.amazonaws.com/pe-builds/released'
## Master
config.vm.define :master do |master|
master.vm.provider :vmware_fusion do |v|
v.vmx["memsize"] = "1024"
v.vmx["numvcpus"] = "2"
end
master.vm.network :private_network, ip: "10.10.100.100"
master.vm.hostname = 'master.puppetlabs.vm'
master.vm.provision :hosts
master.vm.provision :pe_bootstrap do |pe|
pe.role = :master
end
config.vm.provision "shell",
inline: "service iptables stop"
end
## agent 1
config.vm.define :agent1 do |agent|
agent.vm.provider :vmware_fusion
agent.vm.network :private_network, ip: "10.10.100.111"
agent.vm.hostname = 'agent1.puppetlabs.vm'
agent.vm.provision :hosts
agent.vm.provision :pe_bootstrap do |pe|
pe.role = :agent
pe.master = 'master.puppetlabs.vm'
end
end
## agent 2
config.vm.define :agent2 do |agent|
agent.vm.provider :vmware_fusion
agent.vm.network :private_network, ip: "10.10.100.112"
agent.vm.hostname = 'agent2.puppetlabs.vm'
agent.vm.provision :hosts
agent.vm.provision :pe_bootstrap do |pe|
pe.role = :agent
pe.master = 'master.puppetlabs.vm'
end
end
## agent 3
config.vm.define :agent3 do |agent|
agent.vm.provider :vmware_fusion
agent.vm.network :private_network, ip: "10.10.100.113"
agent.vm.hostname = 'agent3.puppetlabs.vm'
agent.vm.provision :hosts
agent.vm.provision :pe_bootstrap do |pe|
pe.role = :agent
pe.master = 'master.puppetlabs.vm'
end
end
config.vm.define :master2 do |master|
master.vm.provider :vmware_fusion do |v|
v.vmx["memsize"] = "1024"
v.vmx["numvcpus"] = "2"
end
master.vm.network :private_network, ip: "10.10.100.101"
master.vm.hostname = 'master2.puppetlabs.vm'
master.vm.provision :hosts
master.vm.provision :pe_bootstrap do |pe|
pe.role = :master
end
config.vm.provision "shell",
inline: "service iptables stop"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment