modificados ficheros para usar virtualbox
This commit is contained in:
parent
4acf7872b8
commit
f8dd48901f
24
Vagrantfile
vendored
24
Vagrantfile
vendored
@ -1,34 +1,24 @@
|
|||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
config.vm.box = "debian/bookworm64"
|
config.vm.box = "debian/bookworm64"
|
||||||
config.vm.box_check_update = false
|
config.vm.box_check_update = false
|
||||||
config.vm.synced_folder ".", "/vagrant", disabled: true
|
config.vm.synced_folder '.', '/vagrant', disabled: true
|
||||||
config.vm.provider "libvirt" do |v|
|
config.vm.provider "virtualbox" do |v|
|
||||||
v.memory = 4096
|
v.memory = 1024
|
||||||
v.cpus = 4
|
v.cpus = 2
|
||||||
v.driver = "qemu"
|
|
||||||
end
|
end
|
||||||
config.vm.define "plano-control" do |pcontrol|
|
config.vm.define "plano-control" do |pcontrol|
|
||||||
pcontrol.vm.hostname = "plano-control"
|
pcontrol.vm.hostname = "plano-control"
|
||||||
pcontrol.vm.network "private_network",
|
pcontrol.vm.network "private_network",
|
||||||
:libvirt__network_name => "k3s-vagrant",
|
ip: "192.168.56.10"
|
||||||
:ip => "10.10.10.10",
|
|
||||||
:libvirt__dhcp_enabled => false,
|
|
||||||
:libvirt__forward_mode => "veryisolated"
|
|
||||||
end
|
end
|
||||||
config.vm.define "nodo1" do |nodo1|
|
config.vm.define "nodo1" do |nodo1|
|
||||||
nodo1.vm.hostname = "nodo1"
|
nodo1.vm.hostname = "nodo1"
|
||||||
nodo1.vm.network "private_network",
|
nodo1.vm.network "private_network",
|
||||||
:libvirt__network_name => "k3s-vagrant",
|
ip: "192.168.56.20"
|
||||||
:ip => "10.10.10.20",
|
|
||||||
:libvirt__dhcp_enabled => false,
|
|
||||||
:libvirt__forward_mode => "veryisolated"
|
|
||||||
end
|
end
|
||||||
config.vm.define "nodo2" do |nodo2|
|
config.vm.define "nodo2" do |nodo2|
|
||||||
nodo2.vm.hostname = "nodo2"
|
nodo2.vm.hostname = "nodo2"
|
||||||
nodo2.vm.network "private_network",
|
nodo2.vm.network "private_network",
|
||||||
:libvirt__network_name => "k3s-vagrant",
|
ip: "192.168.56.30"
|
||||||
:ip => "10.10.10.30",
|
|
||||||
:libvirt__dhcp_enabled => false,
|
|
||||||
:libvirt__forward_mode => "veryisolated"
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
34
Vagrantfile_kvm
Normal file
34
Vagrantfile_kvm
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
Vagrant.configure("2") do |config|
|
||||||
|
config.vm.box = "debian/bookworm64"
|
||||||
|
config.vm.box_check_update = false
|
||||||
|
config.vm.synced_folder ".", "/vagrant", disabled: true
|
||||||
|
config.vm.provider "libvirt" do |v|
|
||||||
|
v.memory = 4096
|
||||||
|
v.cpus = 4
|
||||||
|
v.driver = "qemu"
|
||||||
|
end
|
||||||
|
config.vm.define "plano-control" do |pcontrol|
|
||||||
|
pcontrol.vm.hostname = "plano-control"
|
||||||
|
pcontrol.vm.network "private_network",
|
||||||
|
:libvirt__network_name => "k3s-vagrant",
|
||||||
|
:ip => "10.10.10.10",
|
||||||
|
:libvirt__dhcp_enabled => false,
|
||||||
|
:libvirt__forward_mode => "veryisolated"
|
||||||
|
end
|
||||||
|
config.vm.define "nodo1" do |nodo1|
|
||||||
|
nodo1.vm.hostname = "nodo1"
|
||||||
|
nodo1.vm.network "private_network",
|
||||||
|
:libvirt__network_name => "k3s-vagrant",
|
||||||
|
:ip => "10.10.10.20",
|
||||||
|
:libvirt__dhcp_enabled => false,
|
||||||
|
:libvirt__forward_mode => "veryisolated"
|
||||||
|
end
|
||||||
|
config.vm.define "nodo2" do |nodo2|
|
||||||
|
nodo2.vm.hostname = "nodo2"
|
||||||
|
nodo2.vm.network "private_network",
|
||||||
|
:libvirt__network_name => "k3s-vagrant",
|
||||||
|
:ip => "10.10.10.30",
|
||||||
|
:libvirt__dhcp_enabled => false,
|
||||||
|
:libvirt__forward_mode => "veryisolated"
|
||||||
|
end
|
||||||
|
end
|
@ -3,19 +3,19 @@ all:
|
|||||||
planos_control:
|
planos_control:
|
||||||
hosts:
|
hosts:
|
||||||
p_nodo:
|
p_nodo:
|
||||||
ansible_ssh_host: 192.168.121.234
|
ansible_ssh_host: 192.168.56.10
|
||||||
ansible_ssh_user: vagrant
|
ansible_ssh_user: vagrant
|
||||||
ansible_ssh_private_key_file: ../.vagrant/machines/plano-control/libvirt/private_key
|
ansible_ssh_private_key_file: ../.vagrant/machines/plano-control/virtualbox/private_key
|
||||||
trabajadores:
|
trabajadores:
|
||||||
hosts:
|
hosts:
|
||||||
nodo1:
|
nodo1:
|
||||||
ansible_ssh_host: 192.168.121.157
|
ansible_ssh_host: 192.168.56.20
|
||||||
ansible_ssh_user: vagrant
|
ansible_ssh_user: vagrant
|
||||||
ansible_ssh_private_key_file: ../.vagrant/machines/nodo1/libvirt/private_key
|
ansible_ssh_private_key_file: ../.vagrant/machines/nodo1/virtualbox/private_key
|
||||||
nodo2:
|
nodo2:
|
||||||
ansible_ssh_host: 192.168.121.33
|
ansible_ssh_host: 192.168.56.30
|
||||||
ansible_ssh_user: vagrant
|
ansible_ssh_user: vagrant
|
||||||
ansible_ssh_private_key_file: ../.vagrant/machines/nodo2/libvirt/private_key
|
ansible_ssh_private_key_file: ../.vagrant/machines/nodo2/virtualbox/private_key
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
fichero: "/home/vagrant/k3s.sh"
|
fichero: "/home/vagrant/k3s.sh"
|
||||||
|
24
ansible/hosts_kvm
Normal file
24
ansible/hosts_kvm
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
all:
|
||||||
|
children:
|
||||||
|
planos_control:
|
||||||
|
hosts:
|
||||||
|
p_nodo:
|
||||||
|
ansible_ssh_host: 192.168.121.234
|
||||||
|
ansible_ssh_user: vagrant
|
||||||
|
ansible_ssh_private_key_file: ../.vagrant/machines/plano-control/libvirt/private_key
|
||||||
|
trabajadores:
|
||||||
|
hosts:
|
||||||
|
nodo1:
|
||||||
|
ansible_ssh_host: 192.168.121.157
|
||||||
|
ansible_ssh_user: vagrant
|
||||||
|
ansible_ssh_private_key_file: ../.vagrant/machines/nodo1/libvirt/private_key
|
||||||
|
nodo2:
|
||||||
|
ansible_ssh_host: 192.168.121.33
|
||||||
|
ansible_ssh_user: vagrant
|
||||||
|
ansible_ssh_private_key_file: ../.vagrant/machines/nodo2/libvirt/private_key
|
||||||
|
|
||||||
|
vars:
|
||||||
|
fichero: "/home/vagrant/k3s.sh"
|
||||||
|
token_k3s: ""
|
||||||
|
token_k3s_base64: ""
|
||||||
|
ip_pcontrol: "10.10.10.10"
|
Loading…
x
Reference in New Issue
Block a user