Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am logicalchaos on github.
  • I am logicalchaos (https://keybase.io/logicalchaos) on keybase.
  • I have a public key ASBN_kMYXRo_PEXr57-R9SV09zhJM8v_4hdBR_uKH_iW0wo

To claim this, I am signing this object:

@LogicalChaos
LogicalChaos / Vagrantfile
Created Jan 8, 2015
Add to ~/.vagrant.d directory to put vagrant meta directories (hence VM) in a common directory based on the current directory name.
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
if !ARGV.find { |arg| /global/ =~ arg } and !ENV['VAGRANT_DOTFILE_PATH'] and File.exists?('.vagrant.keep')
if !ENV['VAGRANT_COMMON_DIRECTORY_ROOT']
abort '.vagrant.keep file is present but VAGRANT_COMMON_DIRECTORY_ROOT is not set'
end
pn = Pathname::pwd
ENV['VAGRANT_DOTFILE_PATH'] = "#{ENV['VAGRANT_COMMON_DIRECTORY_ROOT']}/#{pn.basename}"