diff --git a/ansible/Vagrantfile b/ansible/Vagrantfile new file mode 100644 index 0000000000000000000000000000000000000000..6dd86b0ee3bf5aba07d8d5a849878fa36228f313 --- /dev/null +++ b/ansible/Vagrantfile @@ -0,0 +1,42 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + config.vm.define "hub" do |hub| + hub.vm.box = "ubuntu/mantic64" + hub.vm.hostname = "hub" + hub.vm.network "private_network", ip: "192.168.56.10" + hub.vm.provider "virtualbox" do |v| + # This is high because in this scenarion, the hub will be responsible form runnin, both, TFS and Containerlab + # Other configurations between the nodes can be used, but that will require to also change the playbook + v.memory = 16384 + v.cpus = 6 + end + hub.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "/home/vagrant/.ssh/host.pub" + hub.vm.provision "shell", inline: "cat /home/vagrant/.ssh/host.pub >> /home/vagrant/.ssh/authorized_keys" + end + + config.vm.define "spoke1" do |spoke1| + spoke1.vm.box = "ubuntu/mantic64" + spoke1.vm.hostname = "spoke1" + spoke1.vm.network "private_network", ip: "192.168.56.11" + spoke1.vm.provider "virtualbox" do |v| + v.memory = 2048 + v.cpus = 1 + end + spoke1.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "/home/vagrant/.ssh/host.pub" + spoke1.vm.provision "shell", inline: "cat /home/vagrant/.ssh/host.pub >> /home/vagrant/.ssh/authorized_keys" + end + + config.vm.define "spoke2" do |spoke2| + spoke2.vm.box = "ubuntu/mantic64" + spoke2.vm.hostname = "spoke2" + spoke2.vm.network "private_network", ip: "192.168.56.12" + spoke2.vm.provider "virtualbox" do |v| + v.memory = 2048 + v.cpus = 1 + end + spoke2.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "/home/vagrant/.ssh/host.pub" + spoke2.vm.provision "shell", inline: "cat /home/vagrant/.ssh/host.pub >> /home/vagrant/.ssh/authorized_keys" + end +end