-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
34 lines (28 loc) · 1.11 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
Vagrant.configure("2") do |config|
config.vm.define "ubuntu-xenial64" do |web|
web.vm.box = 'ubuntu/xenial64'
web.vm.hostname = 'ubuntu-xenial64'
web.vm.network :private_network, ip: '192.168.50.102'
web.vm.provider :virtualbox do |vb|
vb.name = "ubuntu-xenial64"
vb.gui = false
vb.cpus = 4
vb.memory = 4096
vb.customize ['modifyvm', :id, '--natdnsproxy1', 'off']
vb.customize ['modifyvm', :id, '--natdnshostresolver1', 'off']
end
web.disksize.size = '40GB'
# Mutagen により、ホスト(PC)側とゲスト(ローカル開発環境)でファイルが同期された状態になる
web.mutagen.orchestrate = true
web.vm.synced_folder './', '/home/vagrant/projects', type: "rsync",
rsync_auto: true,
rsync__exclude: ['node_modules/', 'log/', 'tmp/']
web.vm.provision :docker, run: 'always'
web.vm.provision :docker_compose
web.vm.provision "ansible_local" do |ansible|
ansible.playbook = "ansible-ubuntu-xenial/site.yml"
ansible.inventory_path = "ansible-ubuntu-xenial/hosts"
ansible.limit = 'all'
end
end
end