Last active
April 1, 2020 15:02
-
-
Save filiperfernandes/abf36899d2e7e6be326095195c8494b6 to your computer and use it in GitHub Desktop.
Sample Vagrantfile config
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 characters
#!/usr/bin/env bash | |
#apt update | |
#apt upgrade -y | |
apt install vim -y | |
echo "Bootsratp completed" |
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 characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.define "base" do |base| | |
#Set vagrant box to use | |
base.vm.box = "debian/buster64" | |
#Setup basic settings | |
base.vm.provider "virtualbox" do |vb| | |
vb.gui = false | |
vb.name = "buster" | |
vb.memory = 1024 | |
vb.cpus = 2 | |
end | |
base.disksize.size = '20GB' | |
# Setup networking | |
base.vm.network :forwarded_port, guest: 22, host: 12200, id: 'ssh' | |
base.vm.network "private_network", virtualbox__intnet: "link_1", | |
ip: "10.0.1.100" | |
base.vm.network "private_network", virtualbox__intnet: "link_2", | |
ip: "10.0.2.100" | |
# Sync local directory with guest "/vagrant" | |
base.vm.synced_folder ".", "/vagrant", type: "virtualbox" | |
# Setup provisioning | |
base.vm.provision "shell", inline: <<-SHELL | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
SHELL | |
# and/or | |
base.vm.provision :shell, path: "bootstrap.sh" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment