-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathVagrantfile
37 lines (36 loc) · 1.46 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "boxcutter/ubuntu1604"
config.vm.provider "libvirt" do |v, override|
override.vm.box = "elastic/ubuntu-16.04-x86_64"
end
config.vm.network "forwarded_port", guest: 8082, host: 8080
config.vm.synced_folder "./", "/opt/postmaster/git"
config.vm.provision "shell", inline: "apt-get update && apt-get install -y git"
config.vm.provision "ansible_local" do |ansible|
ansible.playbook = "ops/ansible/deploy.yml"
ansible.galaxy_role_file = "ops/ansible/vagrant-requirements.yml"
ansible.sudo = true
ansible.extra_vars = {
postmaster_install_mysql: true,
postmaster_vagrant_install: true,
postmaster_secret_key: 'ChangeMe',
postmaster_db_user: 'vagrant',
postmaster_db_password: 'vagrant',
mysql_bind_address: '127.0.0.1',
mysql_enabled_on_startup: 'yes',
mysql_databases: [{
name: 'servermail'
}],
mysql_users: [{
name: "vagrant",
password: "vagrant",
host: "localhost",
priv: "servermail.*:ALL",
}]
}
end
# We have to change the permission of config.py to world readable since ownership can't be modified on a synced folder
config.vm.provision "shell", inline: "chmod 664 /opt/postmaster/git/config.py"
end