That seems to be the best solution I've seen.  Thanks a ton Kris.

On Friday, January 24, 2014 3:07:53 PM UTC-8, Kris Pruden wrote:
>
> 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]<javascript:>
> > 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] <javascript:>.
>> 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.

Reply via email to