-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVagrantfile
More file actions
31 lines (27 loc) · 1 KB
/
Vagrantfile
File metadata and controls
31 lines (27 loc) · 1 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
# @ansible_home = "/home/vagrant/.ansible"
Vagrant.configure('2') do |config|
config.vm.define 'local' do |local|
local.vm.box = 'ubuntu/focal64'
# 14.04: trusty, 16.04: xenial, 18.04: bionic, 20.04: focal
local.vm.box_check_update = 'false'
# config.vm.network :forwarded_port, guest: 9000, host: 9200
# config.vm.network :forwarded_port, guest: 9001, host: 9201
local.vm.provider 'virtualbox' do |vb|
vb.memory = '1024'
end
local.vm.provision 'ansible_local' do |ansible|
ansible.limit = 'all'
ansible.verbose = false
ansible.playbook = 'main.yml'
roles_file = 'requirements.yml'
if File.exist?(roles_file) && !Psych.load_file(roles_file).equal?(nil)
ansible.galaxy_role_file = roles_file
ansible.galaxy_roles_path = '/home/vagrant/.ansible/roles/'
ansible.galaxy_command = 'ansible-galaxy install --role-file=%{role_file} --roles-path=%{roles_path}'
end
end
end
end
#
#-*- mode: ruby -*-
# vim:ft=ruby :