Created
December 9, 2015 15:36
-
-
Save robinwl/1fc9077815d3e943aec4 to your computer and use it in GitHub Desktop.
Vagrant Ubuntu Trusty
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 : | |
$fixnotty = <<SCRIPT | |
sudo sed -i '/tty/!s/mesg n/tty -s \\&\\& mesg n/' /root/.profile | |
SCRIPT | |
$mirrors = <<SCRIPT | |
export DEBIAN_FRONTEND=noninteractive | |
cat > /etc/apt/sources.list <<- EOM | |
deb http://se.archive.ubuntu.com/ubuntu/ trusty main restricted | |
deb-src http://se.archive.ubuntu.com/ubuntu/ trusty main restricted | |
deb http://se.archive.ubuntu.com/ubuntu/ trusty-updates main restricted | |
deb-src http://se.archive.ubuntu.com/ubuntu/ trusty-updates main restricted | |
deb http://se.archive.ubuntu.com/ubuntu/ trusty universe | |
deb-src http://se.archive.ubuntu.com/ubuntu/ trusty universe | |
deb http://se.archive.ubuntu.com/ubuntu/ trusty-updates universe | |
deb-src http://se.archive.ubuntu.com/ubuntu/ trusty-updates universe | |
deb http://se.archive.ubuntu.com/ubuntu/ trusty multiverse | |
deb-src http://se.archive.ubuntu.com/ubuntu/ trusty multiverse | |
deb http://se.archive.ubuntu.com/ubuntu/ trusty-updates multiverse | |
deb-src http://se.archive.ubuntu.com/ubuntu/ trusty-updates multiverse | |
deb http://se.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse | |
deb-src http://se.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse | |
deb http://security.ubuntu.com/ubuntu trusty-security main restricted | |
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted | |
deb http://security.ubuntu.com/ubuntu trusty-security universe | |
deb-src http://security.ubuntu.com/ubuntu trusty-security universe | |
deb http://security.ubuntu.com/ubuntu trusty-security multiverse | |
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse | |
#deb http://extras.ubuntu.com/ubuntu trusty main | |
#deb-src http://extras.ubuntu.com/ubuntu trusty main | |
EOM | |
SCRIPT | |
$update = <<SCRIPT | |
apt-get update | |
SCRIPT | |
Vagrant.configure(2) do |config| | |
config.vm.hostname = "trusty.dev.vagrant" | |
config.vm.box = "http://ftp.naas.io/pub/vagrant/boxes/bento/virtualbox/opscode_ubuntu-14.04_chef-provisionerless.box" | |
config.vm.network "forwarded_port", guest: 80, host: 8080 | |
config.vm.provider "virtualbox" do |vb| | |
vb.customize [ | |
"modifyvm", :id, | |
"--memory", "1024", | |
"--paravirtprovider", "kvm", | |
"--cpus", "1" | |
] | |
end | |
config.vm.provision "shell", privileged: false, inline: $fixnotty | |
config.vm.provision "shell", inline: $mirrors | |
config.vm.provision "shell", inline: $update | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment