Created
March 4, 2024 05:40
-
-
Save sampathshivakumar/1264b7dc47e5c909708661fa01a015da to your computer and use it in GitHub Desktop.
Revisions
-
sampathshivakumar created this gist
Mar 4, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ # Linux for DevOps Lab Setup $setup_lab = <<SCRIPT # Enable root login in ssh configuration sed -i "s/^PermitRootLogin no/PermitRootLogin yes/g" /etc/ssh/sshd_config sed -i "s/^PasswordAuthentication no/PasswordAuthentication yes/g" /etc/ssh/sshd_config systemctl restart sshd SCRIPT Vagrant.configure("2") do |config| config.vm.define "centos" do |subconfig| subconfig.vm.box = "boxomatic/centos-stream-9" subconfig.vm.hostname = "centos" subconfig.vm.network "private_network", ip: "192.168.2.10" subconfig.vm.provision "shell", inline:$setup_lab subconfig.vm.provider "virtualbox" do |vb| vb.memory = "1024" end end config.vm.define "ubuntu" do |subconfig| subconfig.vm.box = "ubuntu/jammy64" subconfig.vm.hostname = "ubuntu" subconfig.vm.network "private_network", ip: "192.168.2.20" subconfig.vm.provision "shell", inline:$setup_lab subconfig.vm.provider "virtualbox" do |vb| vb.memory = "1024" end end end