# -*- mode: ruby -*- # vi: set ft=ruby : # Setup, first time only: # # vagrant up && vagrant reload # # Usage: # # vagrant up # vagrant ssh Vagrant.configure(2) do |config| config.vm.define "bionic" config.vm.hostname = "bionic" config.vm.box = "ubuntu/bionic64" config.vm.box_check_update = false # Below, bridge value is specific to the host machine interfaces. # To display valid options: # # * Remove bridge key below. # * vagrant up # * Review options presented interactively by Vagrant. # * Ctrl-C, update Vagrantfile. config.vm.network "public_network", bridge: "...", mac: "02CC50F01804", use_dhcp_assigned_default_route: true config.vm.provider "virtualbox" do |vb| vb.cpus = 2 vb.memory = "1024" vb.name = "bionic" vb.customize ["modifyvm", :id, "--audio", "none"] vb.customize ["modifyvm", :id, "--nictype1", "virtio"] vb.customize ["modifyvm", :id, "--nictype2", "virtio"] end config.vm.synced_folder ".", "/vagrant", disabled: true # Prepare to have all local authorized keys also be authorized by vagrant. # Append to ~/.ssh/authorized_keys in shell provision below. config.vm.provision "file", source: "~/.ssh/authorized_keys", destination: "~/.ssh/user_authorized_keys" config.vm.provision "shell", privileged: true, keep_color: true, inline: <<-SHELL export LANGUAGE=en_US.UTF-8 export LANG=$LANGUAGE export LC_ALL=$LANGUAGE export DEBIAN_FRONTEND=noninteractive locale-gen $LANGUAGE update-locale LANGUAGE=$LANGUAGE update-locale LANG=$LANG update-locale LC_ALL=$LC_ALL dpkg-reconfigure locales timedatectl set-timezone America/New_York dpkg-reconfigure tzdata apt-get update apt-get dist-upgrade -y apt-get install -y vim update-alternatives --set editor /usr/bin/vim.basic echo Adding additional user authorized keys ... sort -u /home/vagrant/.ssh/{user_authorized_keys,authorized_keys} > \ /tmp/authorized_keys mv /tmp/authorized_keys /home/vagrant/.ssh/authorized_keys SHELL end