-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
40 lines (31 loc) · 1.08 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu14-cloudimage"
config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
# Your implementation goes here
#Modify VM configuration
config.vm.define :lempServ do |lempServ|
#Define hostname of instance
lempServ.vm.hostname = "lempServ.local"
#Set the instance IP address
lempServ.vm.network :private_network, ip: "172.17.2.18"
lempServ.vm.network "forwarded_port", guest: 80, host:80
lempServ.vm.provider "virtualbox" do |v|
#Configure guest to use host's DNS resolvers.
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
#Set vm name, memory, and # of cpu's
v.name = "lempServ"
v.memory = 512
v.cpus = 2
end
end
#Ansible provisioning
config.ssh.insert_key = false
config.vm.provision :ansible do |ansible|
ansible.verbose = "vvvv"
ansible.playbook = "lempServ.yml"
ansible.inventory_path = "hosts"
ansible.sudo = true
end
end