Created
July 13, 2016 20:27
-
-
Save abby-fuller/86072a73fb16b35e7c80ee2471ecc7b5 to your computer and use it in GitHub Desktop.
airtime backend vagrant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
MEMORY = `sysctl -n hw.memsize`.to_i / 1024 / 1024 / 2 | |
CPUS = `sysctl -n hw.ncpu`.to_i | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
if ENV['VM'] == "virtualbox" | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.provider "virtualbox" do |v, override| | |
v.memory = MEMORY | |
v.cpus = CPUS | |
end | |
else | |
config.vm.box = "parallels/ubuntu-14.04" | |
config.vm.provider "parallels" do |v, override| | |
v.update_guest_tools = true | |
v.memory = MEMORY | |
v.cpus = CPUS | |
end | |
end | |
config.ssh.forward_agent = true | |
config.vm.provision "ansible" do |ansible| | |
if ENV["VAULT_PASSWORD_FILE"] == nil | |
ansible.ask_vault_pass = true | |
else | |
ansible.vault_password_file = ENV["VAULT_PASSWORD_FILE"] | |
end | |
if ENV["e"] == "test" | |
ansible.playbook = "ansible/vagrant/test.yml" | |
elsif ENV["e"] == "web" | |
ansible.playbook = "ansible/vagrant/web.yml" | |
elsif ENV["e"] == "full" | |
ansible.playbook = "ansible/vagrant/full.yml" | |
else | |
ansible.playbook = "ansible/vagrant/provision.yml" | |
end | |
end | |
config.vm.network :forwarded_port, host: <port>, guest: <port> #airtime container | |
config.vm.network :forwarded_port, host: <port>, guest: <port> #airtime container | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment