This repository was archived by the owner on Aug 27, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVagrantfile
More file actions
39 lines (34 loc) · 1.3 KB
/
Vagrantfile
File metadata and controls
39 lines (34 loc) · 1.3 KB
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.define :master do |master|
master.vm.box = "precise32"
master.vm.hostname = "master"
master.vm.network :private_network, ip: "192.168.250.2"
master.vm.network "forwarded_port", guest: 8080, host: 8080
master.vm.provision :shell,
:inline => 'grep -qs 192.168.250.3 /etc/hosts || echo "192.168.250.3 minion" >> /etc/hosts'
master.vm.provision :shell,
:inline => 'grep -qs 192.168.250.4 /etc/hosts || echo "192.168.250.4 minion2" >> /etc/hosts'
master.vm.provision :shell,
:inline => 'grep -qs 192.168.250.2 /etc/hosts || echo "192.168.250.2 master salt" >> /etc/hosts'
master.vm.provision :shell, path: "saltmaster.sh"
master.vm.provider "virtualbox" do |v|
v.memory = 1024
v.cpus = 2
v.gui = true
end
end
config.vm.define :minion do |minion|
minion.vm.box = "precise32"
minion.vm.hostname = "minion"
minion.vm.network :private_network, ip: "192.168.250.3"
minion.vm.provision :shell,
:inline => 'grep -qs 192.168.250.2 /etc/hosts || echo "192.168.250.2 master salt" >> /etc/hosts'
minion.vm.provision :shell, path: "saltminion.sh"
minion.vm.provider "virtualbox" do |v|
v.memory = 512
v.cpus = 2
end
end
end