-
Notifications
You must be signed in to change notification settings - Fork 1
/
Vagrantfile
62 lines (57 loc) · 1.42 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
ENV['ANSIBLE_ROLES_PATH'] = "../../roles"
Vagrant.configure(2) do |config|
config.vm.define "lxc_12" do |lxc_12_cfg|
lxc_12_cfg.vm.box='ubuntu/precise64'
lxc_12_cfg.vm.provider :virtualbox do |v|
v.name = "lxc_12"
# v.gui = true
end
lxc_12_cfg.ssh.insert_key = false
end
config.vm.define "lxc_14" do |lxc_14_cfg|
lxc_14_cfg.vm.box='ubuntu/trusty64'
lxc_14_cfg.vm.provider :virtualbox do |v|
v.name = "lxc_14"
end
lxc_14_cfg.ssh.insert_key = false
end
i = 0;
config.vm.provision :ansible do |ansible|
if i <= 0
ansible.playbook = "examples/lxc.yml"
# ansible.verbose = "vvv"
ansible.sudo = true
# ansible.tags = ['debug']
ansible.groups = {
"lxcs" => ["lxc_12", "lxc_14"],
}
ansible.extra_vars = {
update_kernel_if_required: true,
wait_for_reboot: 15,
lxc_vms:
[
{
name: "test1",
type: "ubuntu",
revision: "precise",
servername: "test1.example.com",
http_port: 5000,
https: true
},
{
name: "test2",
type: "ubuntu",
revision: "trusty",
servername: "test2.example.com",
http_port: 5000,
https: false
},
]
}
ansible.limit = 'all'
i+=1;
end
end
end