Skip to content

Instantly share code, notes, and snippets.

@williamn
Last active May 16, 2016 09:35
Show Gist options
  • Save williamn/59a2d4a3fb695967a5668732b38be55e to your computer and use it in GitHub Desktop.
Save williamn/59a2d4a3fb695967a5668732b38be55e to your computer and use it in GitHub Desktop.
Minimalistic Ubuntu 14.04 vagrant provision script
#!/bin/sh
sudo cat > /etc/apt/sources.list << EOF
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-backports main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-security main restricted universe multiverse
deb-src mirror://mirrors.ubuntu.com/mirrors.txt trusty main restricted universe multiverse
deb-src mirror://mirrors.ubuntu.com/mirrors.txt trusty-updates main restricted universe multiverse
deb-src mirror://mirrors.ubuntu.com/mirrors.txt trusty-backports main restricted universe multiverse
deb-src mirror://mirrors.ubuntu.com/mirrors.txt trusty-security main restricted universe multiverse
EOF
sudo apt-get update
sudo apt-get install -y git mercurial
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.box_check_update = false
config.vm.network "forwarded_port", guest: 22, host: 2222, id: 'ssh'
config.vm.network "private_network", ip: "10.10.0.2"
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
config.vm.provision "shell", path: "script.sh"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment