This repository has been archived by the owner on Oct 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
56 lines (44 loc) · 1.6 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
# vim: set ft=ruby ts=2 sw=2 et:
# -*- mode: ruby -*-
VAGRANT_API_VERSION = '2'
Vagrant.configure(VAGRANT_API_VERSION) do |config|
if ENV['ANSIBLE_MARIADB_VAGRANT_BOXNAME']
config.vm.box = ENV['ANSIBLE_MARIADB_VAGRANT_BOXNAME']
else
config.vm.box = 'ubuntu/trusty64'
end
config.vm.define :ansiblemariadbtest do |d|
d.vm.hostname = 'ansiblemariadbtest'
d.vm.synced_folder '.', '/vagrant', id: 'vagrant-root', disabled: true
d.vm.provision :ansible do |ansible|
ansible.playbook = 'tests/playbook.yml'
ansible.tags = ENV['ANSIBLE_MARIADB_VAGRANT_ANSIBLE_TAGS']
ansible.skip_tags = ENV['ANSIBLE_MARIADB_VAGRANT_ANSIBLE_SKIP_TAGS']
ansible.verbose = ENV['ANSIBLE_MARIADB_VAGRANT_ANSIBLE_VERBOSE']
if ENV['ANSIBLE_MARIADB_VAGRANT_ANSIBLE_CHECKMODE'] == '1'
ansible.raw_arguments = '--check'
end
ansible.groups = {
'vagrant' => ['ansiblemariadbtest']
}
ansible.limit = 'vagrant'
ansible.raw_arguments = [
'--diff'
]
if ENV['ANSIBLE_MARIADB_VAGRANT_ANSIBLE_CHECKMODE'] == '1'
ansible.raw_arguments << '--check'
end
::File.directory?('.vagrant/provisioners/ansible/inventory/') do
ansible.inventory_path = '.vagrant/provisioners/ansible/inventory/'
end
end
d.vm.provider :virtualbox do |v|
v.customize 'pre-boot', ['modifyvm', :id, '--nictype1', 'virtio']
v.customize [ 'modifyvm', :id, '--name', 'ansiblemariadbtest', '--memory', '512', '--cpus', '1' ]
end
d.vm.provider :libvirt do |lv|
lv.memory = 1024
lv.cpus = 2
end
end
end