-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
38 lines (30 loc) · 1.15 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
Vagrant.configure(2) do |config|
server_name = "devmachine"
config.vm.box = "ubuntu/bionic64"
config.vm.define server_name
# config.landrush.tld = "vm"
# config.landrush.enabled = true
# Box
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--name", server_name]
vb.customize ["modifyvm", :id, "--memory", 2048]
vb.customize ["modifyvm", :id, "--cpus", 2]
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.customize ["modifyvm", :id, "--ioapic", "on"]
end
# Networking
config.vm.network :private_network, ip: "192.168.2.106"
config.vm.hostname = "dmitri.vm"
# Provisioning
config.vm.provision :ansible do |ansible|
ansible.playbook = "./playbooks/install.yml" # setup.yml
ansible.extra_vars = { hostname: server_name, fqdn: "dmitri.vm" }
ansible.limit = "webservers"
ansible.inventory_path = "./playbooks/hosts.local"
ansible.become = true
ansible.compatibility_mode = "2.0"
# ansible.ask_vault_pass = true
# ansible.tags = "nginx"
# ansible.verbose = "vvv"
end
end