-
Notifications
You must be signed in to change notification settings - Fork 6
/
Vagrantfile
68 lines (55 loc) · 2.23 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "sixodp-background", primary: true do |server|
server.vm.box = "bento/ubuntu-20.04"
server.vm.network :private_network, ip: "10.106.10.20"
server.vm.hostname = "sixodp-background"
case RUBY_PLATFORM
when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
# Fix Windows file rights, otherwise Ansible tries to execute files
server.vm.synced_folder ".", "/vagrant", type:"virtualbox", :mount_options => ["dmode=755","fmode=644"]
end
server.vm.provision "shell", inline: "sudo apt-get update"
server.vm.provision "ansible_local" do |ansible|
ansible.install_mode = "pip3"
ansible.inventory_path = "inventories/vagrant"
ansible.playbook = "deploy-servers.yml"
ansible.provisioning_path = "/vagrant/ansible"
ansible.limit = "backgroundserver"
ansible.raw_arguments = ["-v"]
end
server.vm.provider "virtualbox" do |vbox|
vbox.gui = false
vbox.memory = 3048
vbox.cpus = 4
vbox.customize ["modifyvm", :id, "--nictype1", "virtio"]
end
end
config.vm.define "sixodp-web", primary: true do |server|
server.vm.box = "bento/ubuntu-20.04"
server.vm.network :private_network, ip: "10.106.10.21"
server.vm.hostname = "sixodp-web"
case RUBY_PLATFORM
when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
# Fix Windows file rights, otherwise Ansible tries to execute files
server.vm.synced_folder ".", "/vagrant", type:"virtualbox", :mount_options => ["dmode=755","fmode=644"]
end
server.vm.provision "shell", inline: "sudo apt-get update"
server.vm.provision "ansible_local" do |ansible|
ansible.install_mode = "pip3"
ansible.inventory_path = "inventories/vagrant"
ansible.playbook = "deploy-servers.yml"
ansible.provisioning_path = "/vagrant/ansible"
ansible.limit = "webserver"
ansible.raw_arguments = ["-v"]
end
server.vm.provider "virtualbox" do |vbox|
vbox.gui = false
vbox.memory = 3048
vbox.cpus = 4
vbox.customize ["modifyvm", :id, "--nictype1", "virtio"]
end
end
end