forked from naingyeminn/ansible-lab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
66 lines (62 loc) · 2.03 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define "tower" do |tower|
tower.vm.hostname = "tower.linuxlab.lan"
#tower.dns.tld = "lan"
#tower.dns.patterns = "tower.linuxlab.lan"
tower.vm.box = "ansible/tower"
tower.vm.network "private_network", ip: "192.168.101.10"
tower.vm.provider "virtualbox" do |vb|
vb.name = "ansible-tower"
vb.memory = "4096"
end
tower.vm.provision "shell", path: "generate_hosts.sh"
end
config.vm.define "gitlab" do |gitlab|
gitlab.vm.box = "centos/7"
gitlab.vm.hostname = "gitlab.linuxlab.lan"
#gitlab.dns.tld = "lan"
#gitlab.dns.patterns = "gitlab.linuxlab.lan"
gitlab.vm.network "private_network", ip: "192.168.101.11"
gitlab.vm.provider "virtualbox" do |vb|
vb.name = "gitlab"
vb.cpus = "2"
vb.memory = "1024"
end
gitlab.vm.provision "shell", path: "generate_hosts.sh"
gitlab.vm.provision "shell", path: "provisioner.sh"
end
config.vm.define "server01" do |svr|
svr.vm.box = "centos/7"
svr.vm.hostname = "server01.linuxlab.lan"
#svr.dns.tld = "lan"
#svr.dns.patterns = "server01.linuxlab.lan"
svr.vm.network "private_network", ip: "192.168.101.21"
svr.vm.provider "virtualbox" do |vb|
vb.name = "server01"
vb.memory = "1024"
end
svr.vm.provision "shell", path: "generate_hosts.sh"
svr.vm.provision "shell", inline: <<-SHELL
sudo sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config
sudo systemctl restart sshd
SHELL
end
config.vm.define "dev01" do |svr|
svr.vm.box = "centos/7"
svr.vm.hostname = "server01.linuxlab.lan"
#svr.dns.tld = "lan"
#svr.dns.patterns = "server01.linuxlab.lan"
svr.vm.network "private_network", ip: "192.168.101.31"
svr.vm.provider "virtualbox" do |vb|
vb.name = "dev01"
vb.memory = "1024"
end
svr.vm.provision "shell", path: "generate_hosts.sh"
svr.vm.provision "shell", inline: <<-SHELL
sudo sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config
sudo systemctl restart sshd
SHELL
end
end