You could pack some info about the host into the VM's hostname put something like this in your Vagrantfile:
config.vm.hostname = 'vagrant-' + ENV['USER'] In my case, the hostname would end up being 'vagrant-kris' Kris On Fri, Jan 24, 2014 at 2:49 PM, Calvin Young <[email protected]>wrote: > Is it possible to pass information about the host machine to the Vagrant > VM? > > Everyone on my team uses an identical VM for our dev environment, so we > have no way of telling who's who. I'd love to automatically pass > environment variables through `vagrant ssh` that indicate the > username/hostname of the host machine. One workaround would be to > hard-code an `export HOST_USERNAME=FOO` in each person's `.bashrc` file, > but I feel like there ought to be some way to do this automatically. We're > running Ubuntu 12.04 VMs inside of OS X hosts. > > Has anyone else encountered this problem? > > -- > You received this message because you are subscribed to the Google Groups > "Vagrant" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
