Skip to content

Instantly share code, notes, and snippets.

@lachaib
Created November 22, 2021 08:15
Show Gist options
  • Save lachaib/063ba5dcee4b2993192e86d8e59b33d7 to your computer and use it in GitHub Desktop.
Save lachaib/063ba5dcee4b2993192e86d8e59b33d7 to your computer and use it in GitHub Desktop.
Development Environment with Vagrantfile
Vagrant.configure("2") do |config|
config.vm.define "partoo.dev" do |config|
config.vm.box = "generic/ubuntu2004"
config.vm.hostname = "partoo.dev"
# enable SSH identity to be usable from inside VM
config.ssh.forward_agent = true
# create a bridge to enable using regular ports such as 80, 443
config.vm.network "private_network", ip: "192.168.51.4"
config.vm.provider :virtualbox do |v|
v.memory = 6144
v.cpus = 4
end
end
config.vm.provision "ansible" do |ansible|
ansible.playbook = "devenv.yml"
# become pass will enable some changes in host (editing /etc/hosts)
# vault pass is used to decode an ansible vault with some common secrets
ansible.raw_arguments = ["--ask-become-pass", "--ask-vault-pass"]
ansible.limit = "all,localhost"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment