forked from torian/ansible-role-strongswan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
119 lines (93 loc) · 4.25 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
VAGRANTFILE_API_VERSION = '2'
ANSIBLE_VERSION = "2.3.0.0"
ANSIBLE_ROLE = 'ansible-role-strongswan'
EPEL_REPO_6 = '''
[epel]
name = EPEL 6 - \$basearch
baseurl = http://mirror.globo.com/epel/6/\$basearch
enabled = 1
gpgcheck = 0
'''
EPEL_REPO_7 = '''
[epel]
name = EPEL 7 - \$basearch
baseurl = http://mirror.globo.com/epel/7/\$basearch
enabled = 1
gpgcheck = 0
'''
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provider :virtualbox do |vb|
vb.gui = false
vb.customize [ 'modifyvm', :id, '--memory', '512' ]
vb.customize [ 'modifyvm', :id, '--nictype1', 'virtio' ]
vb.customize [ 'modifyvm', :id, '--natdnshostresolver1', 'on' ]
vb.customize [ 'modifyvm', :id, '--natdnsproxy1', 'on' ]
end
config.vm.define 'ubuntu-xenial' do |ubuntu_x|
ubuntu_x.vm.box = 'ubuntu/xenial64'
#ubuntu_x.vm.hostname = 'ubuntu-xenial'
ubuntu_x.vm.provision 'shell', inline: 'apt-get update'
ubuntu_x.vm.provision 'shell', inline: 'apt-get install -y -qq python-pip libffi-dev libssl-dev python-dev'
ubuntu_x.vm.provision 'shell', inline: "pip install -q ansible==#{ANSIBLE_VERSION} jinja2"
ubuntu_x.vm.provision 'shell', inline: "ln -sf /vagrant /vagrant/#{ANSIBLE_ROLE}"
ubuntu_x.vm.provision 'ansible_local' do |ansible|
ansible.playbook = 'tests/test_vagrant.yml'
end
end
config.vm.define 'ubuntu-trusty' do |ubuntu_t|
ubuntu_t.vm.box = 'ubuntu/trusty64'
ubuntu_t.vm.hostname = 'ubuntu-trusty'
ubuntu_t.vm.provision 'shell', inline: 'apt-get update'
ubuntu_t.vm.provision 'shell', inline: 'apt-get install -y -qq python-pip libffi-dev libssl-dev python-dev'
ubuntu_t.vm.provision 'shell', inline: "pip install -q ansible==#{ANSIBLE_VERSION} ansible-lint jinja2"
ubuntu_t.vm.provision 'shell', inline: "ln -sf /vagrant /vagrant/#{ANSIBLE_ROLE}"
ubuntu_t.vm.provision 'ansible_local' do |ansible|
ansible.playbook = 'tests/test_vagrant.yml'
ansible.extra_vars = {
}
end
end
config.vm.define 'ubuntu-precise' do |ubuntu_p|
ubuntu_p.vm.box = 'ubuntu/precise64'
ubuntu_p.vm.hostname = 'ubuntu-precise'
ubuntu_p.vm.provision 'shell', inline: 'apt-get update'
ubuntu_p.vm.provision 'shell', inline: 'apt-get install -y -qq python-pip libffi-dev libssl-dev python-dev'
ubuntu_p.vm.provision 'shell', inline: "pip install -q ansible==#{ANSIBLE_VERSION} ansible-lint jinja2"
ubuntu_p.vm.provision 'shell', inline: "ln -sf /vagrant /vagrant/#{ANSIBLE_ROLE}"
ubuntu_p.vm.provision 'ansible_local' do |ansible|
ansible.playbook = 'tests/test_vagrant.yml'
ansible.extra_vars = {
}
end
end
config.vm.define 'centos-7' do |centos7|
centos7.vm.box = 'centos/7'
centos7.vm.hostname = 'centos-7'
centos7.vm.provision 'shell', inline: 'yum install -y ca-certificates'
centos7.vm.provision 'shell', inline: "echo \"#{EPEL_REPO_7}\" > /etc/yum.repos.d/epel.repo"
centos7.vm.provision 'shell', inline: 'yum install -y python-pip python-devel gcc libffi-devel openssl-devel'
centos7.vm.provision 'shell', inline: "pip install -q pip --upgrade"
centos7.vm.provision 'shell', inline: "pip install -q ansible==#{ANSIBLE_VERSION} ansible-lint jinja2"
centos7.vm.provision 'shell', inline: "ln -sf /vagrant /vagrant/#{ANSIBLE_ROLE}"
centos7.vm.provision 'ansible_local' do |ansible|
ansible.playbook = 'tests/test_vagrant.yml'
ansible.extra_vars = {
}
end
end
config.vm.define 'centos-6' do |centos6|
centos6.vm.box = "puppetlabs/centos-6.6-64-nocm"
centos6.vm.hostname = 'centos-6'
centos6.vm.provision 'shell', inline: 'yum install -y ca-certificates'
centos6.vm.provision 'shell', inline: "echo \"#{EPEL_REPO_6}\" > /etc/yum.repos.d/epel.repo"
centos6.vm.provision 'shell', inline: 'yum install -y python-pip python-devel gcc libffi-devel openssl-devel'
centos6.vm.provision 'shell', inline: "pip install -q pip --upgrade"
centos6.vm.provision 'shell', inline: "pip install -q ansible==#{ANSIBLE_VERSION} ansible-lint jinja2"
centos6.vm.provision 'ansible_local' do |ansible|
ansible.playbook = 'tests/test_vagrant.yml'
ansible.extra_vars = {
}
end
end
end
# vi:ts=2:sw=2:et:ft=ruby: