demo_ansible/test/Vagrantfile

32 lines
810 B
Ruby

# Allow setting cores and RAM via env-vars, or use defaults
VB_CPUS = ENV['VB_CPUS'] || 2
VB_RAM = ENV['VB_RAM'] || 2048
NAME = "host"
Vagrant.configure(2) do |config|
config.vm.box = "bento/ubuntu-20.04"
# Default: false
# config.vm.box_check_update = false
# config.vm.network "forwarded_port", guest: 80, host: 8080
# config.vm.synced_folder "../data", "/vagrant_data"
# Set a name in the log
config.vm.define NAME+"staging" do |host_staging|
end
config.vm.provider "virtualbox" do |vb|
vb.cpus = VB_CPUS
vb.memory = VB_RAM
#vb.gui = true
#vb.customize ["modifyvm", :id, "--clipboard-mode", "bidirectional"]
end
config.vm.provision "ansible" do |ansible|
ansible.compatibility_mode = "2.0"
ansible.config_file = "../ansible.cfg"
ansible.playbook = "../site.yml"
end
end