-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
125 lines (108 loc) · 3.32 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# config.vm.provider "virtualbox" do |vb|
# vb.memory = 512
# vb.cpus = 1
# #vb.gui = true
# end
config.vm.boot_timeout = 60
## zipi ##############################################################
config.vm.define "zipi" do |zipi|
zipi.vm.host_name = "zipi"
zipi.vm.box = "ubuntu/trusty64"
zipi.vm.provider "virtualbox" do |vb|
vb.memory = 512
vb.cpus = 1
end
zipi.vm.synced_folder ".", "/vagrant",
owner: "vagrant",
group: "vagrant",
# owner: "www-data",
# group: "www-data",
mount_options: ["dmode=775,fmode=664"]
# host:port >> guest:port
zipi.vm.network "forwarded_port", host: 8080, guest: 80, auto_correct: true
zipi.vm.network "forwarded_port", host: 8081, guest: 3306, auto_correct: true
zipi.vm.provision "ansible" do |ansible|
ansible.playbook = "provision-ansible/install-all.yml"
ansible.verbose = 'v'
ansible.host_key_checking = false
ansible.sudo = true
ansible.tags = ['lamp', 'phpmyadmin']
#ansible.skip_tags = ''
ansible.extra_vars = {
ansible_ssh_user: 'vagrant',
vagrant_enable: true,
localhost_only: true
}
zipi.vm.network "private_network",
ip: "192.168.32.10",
virtualbox__intnet: true,
auto_config: true
# STATIC INVENTORY
#ansible.inventory_path = "provision-ansible/hosts/all"
#ansible.limit = 'vagrant'
# AUTO-GENERATED INVENTORY
ansible.groups = {
"group1" => ["zipi"],
"all_groups:children" => ["group1"],
#"group1:vars" => { "vagrant_enable" => true }
}
end
end
### zape ##############################################################
#
# config.vm.define "zape" do |zape|
#
# zape.vm.host_name = "zape"
# zape.vm.box = "ubuntu/trusty64"
# zape.vm.provider "virtualbox" do |vb|
# vb.memory = 512
# vb.cpus = 1
# end
#
# zape.vm.synced_folder ".", "/vagrant",
# owner: "vagrant",
# group: "vagrant",
# mount_options: ["dmode=775,fmode=664"]
#
# zape.vm.network "private_network",
# ip: "192.168.32.11",
# virtualbox__intnet: true,
# auto_config: true
#
# # host:port >> guest:port
# zape.vm.network "forwarded_port", host: 8082, guest: 80, auto_correct: true
# zape.vm.network "forwarded_port", host: 8083, guest: 8080, auto_correct: true
#
# zape.vm.provision "ansible" do |ansible|
# ansible.playbook = "provision-ansible/install.yml"
#
# ansible.verbose = 'v'
#
# ansible.host_key_checking = false
# ansible.sudo = true
#
# ansible.tags = ['base', 'logstash-forwarder']
# #ansible.skip_tags = ''
#
# ansible.extra_vars = {
# ansible_ssh_user: 'vagrant',
# vagrant_enable: true,
# localhost_only: true
# }
#
# # STATIC INVENTORY
# #ansible.inventory_path = "provision-ansible/hosts/all"
# #ansible.limit = 'vagrant'
#
# # AUTO-GENERATED INVENTORY
# ansible.groups = {
# "group1" => ["zape"],
# "all_groups:children" => ["group1"],
# #"group1:vars" => { "vagrant_enable" => true }
# }
# end
# end
end