-
Notifications
You must be signed in to change notification settings - Fork 1
/
Vagrantfile
101 lines (84 loc) · 2.76 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = 'ubuntu/trusty64'
# Disable checking updates for faster startup.
config.vm.box_check_update = false
config.vbguest.auto_update = false if Vagrant.has_plugin?("vagrant-vbguest")
config.vm.provider "virtualbox" do |vbox|
vbox.check_guest_additions = false
end
config.ssh.username = 'vagrant'
config.ssh.forward_agent = true
config.vm.network 'private_network', type: 'dhcp'
config.vm.synced_folder '.', '/vagrant', disabled: true
# Sync 'dotfiles' to master and slave
config.vm.synced_folder "dotfiles", "/home/vagrant", type: 'rsync',
rsync__args: [
"--archive",
"--out-format=%L%n"
],
rsync__verbose: true
# Additionally, sync 'files' to master
config.vm.define 'master' do |master|
master.vm.synced_folder "files", "/home/vagrant/files", type: 'rsync',
rsync__args: [
"--archive",
"--delete",
"--force",
"--numeric-ids"
],
rsync__exclude: [
"/excluded_file.txt",
"/excluded_directory",
"excluded_nested_file.txt",
"excluded_nested_directory",
"*.not",
".git"
],
rsync__verbose: true
end
# Thus, slave has 'dotfiles' only
config.vm.define 'slave', autostart: false
### Vagrant syncer specific settings are introduced below
# How often, in seconds, to read file system events.
# Default: 0.1. Minimum is 0.01.
config.syncer.interval = 0.1
# Whether or not to start rsync-auto after the machine is up, reloaded or
# resumed.
# Default: true
config.syncer.run_on_startup = true
# Whether or not to rsync on machine up before provisioners are ran.
#
# Please do note that this does not affect to the behaviour of rsync-auto,
# as it does a full rsync first anyway to get the remote up to date.
#
# Default: false
config.syncer.disable_up_rsync = false
# Whether or not to show the file system events.
# Default: false
config.syncer.show_events = false
# Whether or not to force using Listen gem, on OS X and Linux distros as well.
# Default: false
config.syncer.force_listen_gem = false
# Optional SSH arguments passed to rsync, e.g. to cut down CPU load.
#
# If config.syncer.ssh_args are not given, the defaults on all platforms are:
# -o StrictHostKeyChecking=no
# -o IdentitiesOnly=true
# -o UserKnownHostsFile=/dev/null
#
# On non-Windows OSes, the defaults also include these:
# -o ControlMaster=auto
# -o ControlPath=<path_in_temp>
# -o ControlPersist=10m
#
config.syncer.ssh_args = [
'-o StrictHostKeyChecking=no',
'-o IdentitiesOnly=true',
'-o UserKnownHostsFile=/dev/null',
'-c arcfour,blowfish-cbc',
'-o Compression=no',
'-x'
]
end