# This guide is optimized for Vagrant 1.8 and above. # Older versions of Vagrant put less info in the inventory they generate. Vagrant.require_version ">= 1.8.0" Vagrant.configure(2) do |config| config.vm.box = "hashicorp/bionic64" config.vm.provider :virtualbox do |vbox, override| vbox.customize ["modifyvm", :id, "--name", "jotbe DevOps VM Ansible Playground"] vbox.customize ["modifyvm", :id, "--memory", 8192] vbox.customize ["modifyvm", :id, "--cpus", Etc.nprocessors/2] vbox.customize ["modifyvm", :id, "--vram", 128] vbox.customize ["modifyvm", :id, "--accelerate3d", "off"] vbox.customize ["modifyvm", :id, "--ioapic", "on"] vbox.customize ["modifyvm", :id, "--clipboard-mode", "bidirectional"] vbox.customize ["modifyvm", :id, "--uartmode1", "disconnected"] vbox.customize ["modifyvm", :id, "--natnet1", "10.0.5/24"] vbox.customize ["storageattach", :id, "--storagectl", "IDE Controller", "--port", "0", "--device", "0", "--type", "dvddrive", "--medium", "emptydrive"] #vbox.customize ["storagectl", :id, "--name", "SATA Controller", "--hostiocache", "on"] # Default: The VM is hosted on an SSD. # Set to "off" if it is hosted on an HDD to enable performance optimizations for rotational drives (e.g. defragmentation): #vbox.customize ["storageattach", :id, "--storagectl", "SCSI", "--port", 0, "--nonrotational", "on"] #vbox.customize ["storageattach", :id, "--storagectl", "SCSI", "--port", 1, "--nonrotational", "on"] # yes we have a gui vbox.gui = true end config.vm.define "jbdev" do |dev| dev.vm.hostname = "jbdev.local" dev.vm.network :private_network, ip: "192.168.6.65" dev.vm.provision :ansible do |ansible| #ansible.verbose = "vvv" ansible.compatibility_mode = "2.0" ansible.playbook = "provisioning/playbook.yml" ansible.inventory_path = "provisioning/inventory" ansible.become = true end end end