-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVagrantfile
42 lines (33 loc) · 1.05 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
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config_values = {
memory: 512,
name: "phpansible",
ip: "33.33.33.61"
}
# Overwrites config_values
if File.exists? 'Vagrantfile.local'
eval File.read 'Vagrantfile.local'
end
config.vm.box = "debian71-64"
config.vm.box_url = "https://dl.dropboxusercontent.com/u/197673519/debian-7.2.0.box"
config.vm.network :private_network, ip: config_values[:ip]
config.ssh.forward_agent = true
config.vm.synced_folder "./", "/var/www/php-ansible.dev", id: "vagrant-root", :nfs => true
config.vm.provider :virtualbox do |vb|
vb.customize [
"modifyvm", :id,
"--name", config_values[:name],
"--memory", config_values[:memory],
"--natdnshostresolver1", "on"
]
end
config.vm.provision :ansible do |ansible|
ansible.playbook = "provisioning/playbook.yml"
#ansible.verbose = "v"
ansible.extra_vars = {
private_interface: config_values[:ip],
hostname: config_values[:name]
}
end
end