-
Notifications
You must be signed in to change notification settings - Fork 5
/
Vagrantfile
51 lines (45 loc) · 1.97 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.ssh.forward_agent = true
config.vm.synced_folder Dir.getwd, "/home/vagrant/roles/ansible-python", nfs: true
# ubuntu 12.04 that Travis CI is using
config.vm.define 'travis', primary: true do |c|
c.vm.network "private_network", ip: "192.168.100.2"
c.vm.box = "precise-server-cloudimg-amd64-vagrant-disk1"
c.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box"
c.vm.provision "shell" do |s|
s.inline = "apt-get update -y; apt-get install python-software-properties; add-apt-repository ppa:rquillo/ansible; apt-get update -y; apt-get install ansible -y"
s.privileged = true
end
end
# ubuntu 14.04 Trusty
config.vm.define 'ubuntu', primary: true do |c|
c.vm.network "private_network", ip: "192.168.100.3"
c.vm.box = "trusty-server-cloudimg-amd64-vagrant-disk1"
c.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
c.vm.provision "shell" do |s|
s.inline = "apt-get update -y; apt-get install -y software-properties-common; apt-add-repository ppa:ansible/ansible; apt-get update -y; apt-get install -y ansible"
s.privileged = true
end
end
# centos 6:
config.vm.define 'centos' do |c|
c.vm.network "private_network", ip: "192.168.100.4"
c.vm.box = "centos65-x86_64-20140116"
c.vm.box_url = "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box"
c.vm.provision "shell" do |s|
s.inline = "yum update gmp; yum install ansible -y"
s.privileged = true
end
end
# centos 7:
config.vm.define 'centos7' do |c|
c.vm.network "private_network", ip: "192.168.100.5"
c.vm.box = "centos/7"
c.vm.provision "shell" do |s|
s.inline = "yum install -y epel-release; yum install -y ansible"
s.privileged = true
end
end
end