Last active
September 20, 2017 11:43
-
-
Save jacqinthebox/5717d05edd8e886b32a4c2089d46065c to your computer and use it in GitHub Desktop.
Vagrantfile for Paralells #vagrant
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
# -*- mode: ruby -* | |
# vi: set ft=ruby | |
$hostfile = <<HOSTFILE | |
Add-Content $ENV:windir\\System32\\drivers\\etc\\hosts "192.168.56.3 `t `t chefserver.dev.local" | |
Add-Content $ENV:windir\\System32\\drivers\\etc\\hosts "192.168.56.3 `t `t chefserver" | |
netsh advfirewall set allprofiles state off | |
HOSTFILE | |
Vagrant.configure(2) do |config| | |
config.vm.box_check_update = false | |
config.vm.define 'lab01' do |lab01_config| | |
lab01_config.vm.box = 'windows_server_2016_core' | |
lab01_config.vm.hostname = 'lab01' | |
lab01_config.vm.network 'private_network', ip: '192.168.56.10' | |
lab01_config.vm.provider 'parallels' do |prl| | |
prl.linked_clone = true | |
end | |
lab01_config.vm.provision 'shell', inline: $hostfile | |
end | |
config.vm.define 'lab02' do |lab02_config| | |
lab02_config.vm.box = 'windows_server_2016' | |
lab02_config.vm.hostname = 'lab02' | |
lab02_config.vm.network 'private_network', ip: '192.168.56.20' | |
lab02_config.vm.provider 'parallels' do |prl| | |
prl.linked_clone = true | |
end | |
lab02_config.vm.provision 'shell', inline: $hostfile | |
end | |
config.vm.define 'chefserver' do |chefserver_config| | |
chefserver_config.vm.box = 'bento/ubuntu-14.04' | |
chefserver_config.vm.hostname = 'chefserver' | |
chefserver_config.vm.network 'private_network', ip: '192.168.56.3' | |
chefserver_config.vm.provider 'parallels' do |v| | |
v.linked_clone = true | |
v.memory = 4096 | |
v.cpus = 2 | |
end | |
chefserver_config.vm.provider 'parallels' do |prl| | |
prl.linked_clone = true | |
end | |
chefserver_config.vm.provision 'shell', inline: <<-SHELL | |
sudo apt-get update && sudo apt-get upgrade -y | |
apt-get install -y wget git curl | |
echo "127.0.0.1 chefserver.dev.local chefserver" >> /etc/hosts | |
echo "192.168.56.10 lab01.mds.local lab01" >> /etc/hosts | |
echo "192.168.56.20 lab02.mds.local lab02" >> /etc/hosts | |
SHELL | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment