Skip to content

Commit

Permalink
Splitt Vagrantfile into two sections.
Browse files Browse the repository at this point in the history
First: Provisioning a linux developer machine with cinnamon gui
Second: Provisioning a linux server to test ansible configs
  • Loading branch information
Daniel Thielking committed Feb 4, 2017
1 parent a7466fb commit 1bba5b6
Showing 1 changed file with 35 additions and 17 deletions.
52 changes: 35 additions & 17 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,51 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

hostname='dev01.local'
suffix='dev01'
fqdn='local'

Vagrant.configure("2") do |config|
config.vm.box = "debian/contrib-jessie64"
config.vm.hostname = "#{hostname}"

#config.vm.synced_folder "/home/thielking", "/home/thielking"
# User debian/contrig-jessie64 Template
config.vm.box = "debian/contrib-jessie64"

config.vm.provider "virtualbox" do |vb|
config.vm.define "gui" do |gui|
# Set hostname for vm
config.vm.hostname = "#{suffix}-gui.#{fqdn}"
# Set VM name
vb.name = "#{hostname}"
gui.name = "#{suffix}-gui.#{fqdn}"
# Display the VirtualBox GUI when booting the machine
vb.gui = false
gui.gui = false
# Customize the amount of memory on the VM:
vb.memory = "2048"
gui.memory = "2048"
# Enable 3D Acceleration
vb.customize ["modifyvm", :id, "--accelerate3d", "on"]
gui.customize ["modifyvm", :id, "--accelerate3d", "on"]
# Set Video Memory to 128MB
vb.customize ["modifyvm", :id, "--vram", "128"]
end
gui.customize ["modifyvm", :id, "--vram", "128"]

# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "ansible" do |ansible|
ansible.playbook = "ansible/install.yaml"
# Provision of Linux Gui with ansible
config.vm.provision "ansible" do |ansible|
ansible.playbook = "gui/install.yaml"
ansible.verbose = "v"
end
end

# Reboot Environment
config.vm.define "server" do |server|
config.vm.provider "virtualbox" do |v|
# Set hostname for vm
config.vm.hostname = "#{suffix}-server.#{fqdn}"
# Set VM name
v.name = "#{suffix}-server.#{fqdn}"
# Display the VirtualBox GUI when booting the machine
v.gui = false
# Customize the amount of memory on the VM:
v.memory = "2048"

# Provision of Linux Gui with ansible
config.vm.provision "ansible" do |ansible|
ansible.playbook = "server/install.yaml"
ansible.verbose = "v"
end
end
end
end

0 comments on commit 1bba5b6

Please sign in to comment.