This repository has been archived by the owner on Feb 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
/
Vagrantfile
63 lines (55 loc) · 2.58 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
Vagrant.configure("2") do |config|
config.vm.hostname = 'go'
config.vm.box = 'opscode-fedora-20'
config.vm.box_url = 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_fedora-20_chef-provisionerless.box'
# config.vm.box = 'opscode-fedora-19'
# config.vm.box_url = 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_fedora-19_chef-provisionerless.box'
# config.vm.box = 'opscode-centos-6.5'
# config.vm.box_url = 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box'
# config.vm.box = 'opscode-ubuntu-13.10'
# config.vm.box_url = 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-13.10_chef-provisionerless.box'
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :machine
config.cache.auto_detect = true
# If you are using VirtualBox, you might want to use that to enable NFS for
# shared folders. This is also very useful for vagrant-libvirt if you want
# bi-directional sync
# config.cache.synced_folder_opts = {
# type: :nfs,
# # The nolock option can be useful for an NFSv3 client that wants to avoid the
# # NLM sideband protocol. Without this option, apt-get might hang if it tries
# # to lock files needed for /var/cache/* operations. All of this can be avoided
# # by using NFSv4 everywhere. Please note that the tcp option is not the default.
# mount_options: ['rw', 'vers=3', 'tcp', 'nolock']
# }
end
# support docker
# config.vm.provider :docker do |docker, override|
# override.vm.box = 'dummy'
# override.vm.box_url = 'http://bit.ly/vagrant-docker-dummy'
# docker.image = "tlalexan/vagrant-centos:latest"
# end
config.vm.provision "ansible" do |ansible|
ansible.groups = {
"server" => ["default"],
"agents" => ["default"]
}
ansible.host_key_checking = false
ansible.playbook = "site.yml"
ansible.sudo = true
ansible.verbose = ''
# Use this if you want to override the Role defaults for example to force a specific number of agents.
ansible.extra_vars = {
GOCD_ADMIN_EMAIL: '[email protected]'
# GOCD_AGENT_INSTANCES: 2
}
end
# machines are defined here...
config.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--memory", "2048"]
end
#config.vm.network "private_network", ip: "192.168.50.2"
config.vm.network "forwarded_port", guest:8153, host: 8153
# don't need mounted folder
config.vm.synced_folder ".", "/vagrant", disabled: true
end