mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/khuedoan/homelab.git
synced 2026-09-20 08:03:58 +08:00
feat(metal): add dev VM for local development or evaluation
This commit is contained in:
20
metal/Vagrantfile
vendored
Normal file
20
metal/Vagrantfile
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "rockylinux/8"
|
||||
|
||||
config.vm.define "test" do |test|
|
||||
test.vm.network "private_network", ip: "192.168.56.101"
|
||||
test.vm.hostname = "dev0"
|
||||
end
|
||||
|
||||
config.vm.provider "virtualbox" do |vb|
|
||||
vb.cpus = 4
|
||||
vb.memory = "8192"
|
||||
end
|
||||
|
||||
config.vm.provision "file", source: "~/.ssh/id_ed25519.pub", destination: "/tmp/id_ed25519.pub"
|
||||
|
||||
config.vm.provision "shell", inline: <<-SHELL
|
||||
mkdir /root/.ssh
|
||||
cat /tmp/id_ed25519.pub >> /root/.ssh/authorized_keys
|
||||
SHELL
|
||||
end
|
||||
Reference in New Issue
Block a user