Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 64 lines (55 sloc) 2.14 KB
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provider :virtualbox do |v, o|
o.ssh.insert_key = false
v.customize ["modifyvm", :id, "--memory", 512]
end
config.vm.define "repo-cache" do |machine|
machine.vm.network :private_network, ip: "10.64.0.2",
:netmask => "255.255.0.0"
machine.vm.hostname = "repo-cache"
config.vm.provision "ansible" do |ansible|
ansible.playbook = "playbooks/repo-cache.yml"
end
end
config.vm.define "ubuntu" do |machine|
machine.vm.network :private_network, ip: "10.64.0.3",
:netmask => "255.255.0.0"
machine.vm.hostname = "ubuntu"
machine.vm.provider :virtualbox do |v, o|
o.vm.box = "ubuntu/trusty64"
o.vm.provision "shell", inline: %(
apt-get update; apt-get --yes install avahi-daemon
sed -i.bak 's/archive\.ubuntu\.com/repo-cache.local/g' /etc/apt/sources.list)
end
end
config.vm.define "debian" do |machine|
machine.vm.network :private_network, ip: "10.64.0.4",
:netmask => "255.255.0.0"
machine.vm.hostname = "debian"
machine.vm.provider :virtualbox do |v, o|
o.vm.box = "debian/jessie64"
o.vm.provision "shell", inline: %(
apt-get update; apt-get --yes install avahi-daemon
sed -i.bak 's/httpredir.debian.org/repo-cache.local/g' /etc/apt/sources.list)
end
end
config.vm.define "centos" do |machine|
machine.vm.network :private_network, ip: "10.64.0.5",
:netmask => "255.255.0.0"
machine.vm.hostname = "centos"
machine.vm.provider :virtualbox do |v, o|
o.vm.box = "centos/7"
o.vm.provision "shell", inline: %(
rpm -Uvh --replacepkgs http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm;
yum install avahi nss-mdns -y;
sed -i.bak 's/mirror\.centos\.org/repo-cache.local/g' /etc/yum.repos.d/*.repo;
sed -i.bak 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Base.repo;
sed -i.bak 's/^#Baseurl/Baseurl/g' /etc/yum.repos.d/CentOS-Base.repo;
service avahi-daemon start)
end
end
end