Vagrant: Exemplos de Arquivos Vagrantfile

From Wiki
Revision as of 23:55, 17 September 2018 by Ebasso (talk | contribs) (→‎CentOS 7.4)

Escolhendo Diferentes Boxes

hashicorp/precise64

Baseado no Ubuntu 12.04 LTS, distribuição enxuta

Vagrant.configure("2") do |config|
 config.vm.box = "hashicorp-vagrant/precise64"
end


CentOS 7.4

Vagrant.configure("2") do |config|
 config.vm.box = "hashicorp-vagrant/centos-7.4"
end

Providers

Escolhendo o virtualizador que vamos utilizar: Virtual Box, VM Ware Workstation, HyperV


Virtual Box

Vagrant.configure("2") do |config|
 config.vm.box = "my-box"
 config.vm.provider "virtualbox" do |v|
   v.gui = true
   v.memory = 1024
   v.cpus = 2
 end
end


VM Ware Workstation

Vagrant.configure("2") do |config|
 config.vm.box = "my-box"
 config.vm.provider "vmware_desktop" do |v|
   v.gui = true
 end
end

Ver também