mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/khuedoan/homelab.git
synced 2026-09-20 08:03:58 +08:00
docs: show dev VM specs dynamically
This commit is contained in:
15
metal/Vagrantfile
vendored
15
metal/Vagrantfile
vendored
@@ -3,6 +3,14 @@ require 'yaml'
|
||||
inventory = YAML.load_file(File.join(__dir__, './inventories/dev.yml'))
|
||||
group_vars = YAML.load_file(File.join(__dir__, './group_vars/all.yml'))
|
||||
|
||||
# ANCHOR: vm_specs
|
||||
# TODO This is ridiculous for a local development environment.
|
||||
# After multi-env is supported, optimize it.
|
||||
cpus = 4
|
||||
memory = "10240"
|
||||
disk_size = "256GB"
|
||||
# ANCHOR_END: vm_specs
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "rockylinux/8"
|
||||
|
||||
@@ -12,15 +20,14 @@ Vagrant.configure("2") do |config|
|
||||
ip = host_vars['ansible_host']
|
||||
node.vm.network "public_network", ip: ip
|
||||
node.vm.hostname = host
|
||||
node.vm.disk :disk, size: "256GB", primary: true
|
||||
node.vm.disk :disk, size: disk_size, primary: true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
config.vm.provider "virtualbox" do |vb|
|
||||
# TODO this is ridiculous for a local environment, optimize it
|
||||
vb.cpus = 6
|
||||
vb.memory = "10240"
|
||||
vb.cpus = cpus
|
||||
vb.memory = memory
|
||||
end
|
||||
|
||||
config.vm.provision "file",
|
||||
|
||||
Reference in New Issue
Block a user