forked from manuelacalvo/ece-devops-course
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
41 lines (36 loc) · 1.1 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# Do not pay attention to this parameter
if Vagrant.has_plugin?("vagrant-vbguest")
config.vm.provider :virtualbox do |vb|
config.vbguest.auto_update = false
end
end
# Define the gitlab_server VM
config.vm.define "gitlab_server" do |server|
# Specify the Vagrant box to use
server.vm.box = "centos/7"
# Specify the VM ip address
server.vm.network :private_network, ip: "20.20.20.2"
# Specify the VM specs when using the Virtualbox provisioner
server.vm.provider "virtualbox" do |vb|
vb.name = "gitlab.server.local"
# VM RAM in MB
vb.memory = 2048
# VM CPUs
vb.cpus = 1
end
config.vm.provider "vmware_desktop" do |vmware|
vmware.vmx["memsize"] = "2048"
vmware.vmx["numvcpus"] = "1"
end
end
# Use Vagrant Ansible provisioner
config.vm.provision "ansible_local" do |ansible|
# The path to the playbooks entry point
ansible.playbook = "playbooks/run.yml"
# Only run the roles with these tags
ansible.tags = "install"
end
end