Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
59 lines (41 sloc) 1.65 KB
Vagrant.configure("2") do |config|
# Box to create VM from
config.vm.box = "ubuntu/trusty64"
# Link by which box can be found, f.e. for URL check
config.vm.box_url = "https://atlas.hashicorp.com/ubuntu/boxes/trusty64"
# Box version to use (latest)
config.vm.box_version = ">= 0"
# Check box update during vagrant up
config.vm.box_check_update = true
# Check checksum after box download
config.vm.box_download_checksum = true
# Set checksum type
config.vm.box_download_checksum_type = "sha1"
# Check SSL certificate before box download
config.vm.box_download_insecure = false
# SSH for linux and winrm for Windows
config.vm.communicator = "ssh"
# SSH username
config.ssh.username = "vagrant"
# Replace default insecure SSH key
config.ssh.insert_key = false
# Set VM network type
config.vm.network "private_network", type: "dhcp"
# Set VM hostname
config.vm.hostname = "svr1"
# Set port forwarding
config.vm.network "forwarded_port", guest: "80", host: "8080", host_ip: "127.0.0.1", protocol: "tcp", auto_correct: true
config.vm.network "forwarded_port", guest: "443", host: "8090", host_ip: "127.0.0.1", protocol: "tcp", auto_correct: true
# Set VM CPU & RAM limits
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--cpuexecutioncap", "75"]
v.memory = "512"
v.cpus = "1"
end
# Seconds to wait during gracefull halt
config.vm.graceful_halt_timeout = "120"
config.vm.provision "ansible" do |ansible|
ansible.verbose = "v"
ansible.playbook = "playbook.yml"
end
end