Added ubuntu setup
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
31
Vagrantfile
vendored
Normal file
31
Vagrantfile
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "bento/ubuntu-24.04"
|
||||
config.vm.box_version = "202404.26.0"
|
||||
|
||||
# Configure VM provider resources (optional)
|
||||
config.vm.provider :virtualbox do |v|
|
||||
v.memory = 4096
|
||||
v.cpus = 2
|
||||
end
|
||||
|
||||
|
||||
config.vm.define "test" do |v|
|
||||
v.vm.hostname = "test"
|
||||
v.vm.network :private_network, ip: "192.168.56.123"
|
||||
|
||||
v.vm.provision "bootstrap", type: "shell" do |s|
|
||||
s.inline = "sudo apt install ansible -y"
|
||||
end
|
||||
#
|
||||
# Use Ansible for provisioning
|
||||
v.vm.provision "ansible" do |ansible|
|
||||
ansible.playbook = "playbook.yml" # Path to the Ansible playbook relative to the Vagrantfile
|
||||
ansible.inventory_path = "inventory" # Path to the inventory file
|
||||
# Extra vars can be defined if needed
|
||||
# ansible.extra_vars = { some_var: "value" }
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user