-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathVagrantfile
55 lines (46 loc) · 1.44 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
if !Vagrant.has_plugin?("vagrant-triggers")
puts "'vagrant-triggers' plugin is required"
puts "This can be installed by running:"
puts
puts " vagrant plugin install vagrant-triggers"
puts
exit
end
if !Vagrant.has_plugin?("vagrant-hostmanager")
puts "'vagrant-hostmanager' plugin is required"
puts "This can be installed by running:"
puts
puts " vagrant plugin install vagrant-hostmanager"
puts
exit
end
Vagrant.configure(2) do |config|
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.hostmanager.manage_guest = true
config.hostmanager.ignore_private_ip = false
config.hostmanager.include_offline = true
config.vm.define "blog" do |node|
node.vm.box = "debian86-vagrant"
node.vm.hostname = "sysco-middleware-blog"
# node.vm.network :private_network, :ip => '10.1.0.10'
# node.hostmanager.aliases = %w(sysco-middleware-blog.localdomain)
node.vm.network :public_network,
:dev => "virbr0",
:mode => "bridge",
:type => "bridge"
node.vm.provider :libvirt do |libvirt|
libvirt.driver = "kvm"
libvirt.uri = "qemu+unix:///system"
libvirt.memory = 512
libvirt.cpus = 1
libvirt.host = "sysco-middleware-blog.localdomain"
end
node.vm.provision "ansible" do |ansible|
ansible.playbook = "main.yml"
end
node.trigger.after [:up, :reload] do
run_remote "cd /vagrant && jekyll serve --detach"
end
end
end