-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVagrantfile
More file actions
57 lines (36 loc) · 1.55 KB
/
Vagrantfile
File metadata and controls
57 lines (36 loc) · 1.55 KB
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
# -*- mode: ruby -*-v
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# MULTI SERVER/VMs environment
#
Vagrant.configure("2") do |config|
# creating are Ansible controller
config.vm.define "controller" do |controller|
controller.vm.box = "bento/ubuntu-18.04"
controller.vm.hostname = 'controller'
# synced_folder to run provision.sh to set up ansible controller
controller.vm.network :private_network, ip: "192.168.33.12"
controller.vm.synced_folder "app", "/home/vagrant/app"
#config.hostsupdater.aliases = ["development.controller"]
end
# creating first VM called web
config.vm.define "web" do |web|
web.vm.box = "bento/ubuntu-18.04"
# downloading ubuntu 18.04 image
web.vm.hostname = 'web'
# assigning host name to the VM
web.vm.network :private_network, ip: "192.168.33.10"
# assigning private IP
#config.hostsupdater.aliases = ["development.web"]
# creating a link called development.web so we can access web page with this link instread of an IP
end
# creating second VM called db
config.vm.define "db" do |db|
db.vm.box = "bento/ubuntu-18.04"
db.vm.hostname = 'db'
db.vm.network :private_network, ip: "192.168.33.11"
# config.hostsupdater.aliases = ["development.db"]
end
end