I don't have our repo scrubbed to provide right now, but if you're interested, you can share the local ~/.drush dir and so create drush aliases for the host machine

You'll need to use vm.define "myvagrantbox" in the vagrantfile, and then tell people to run "vagrant ssh_config >> ~/.ssh/config" after provisioning. This not only allows you to easily ssh into the box from anywhere on the host, but also primes you for easily creating drush aliases in ~/.drush

Anyhow, just food for thought. I'll try to open up our internal vagrant repo soon, as I hate to work in isolation

Comments

alanburke’s picture

Sounds interesting.
I can't get aliases on the host box to connect to my vagrant box, so some examples would be useful.

patcon’s picture

Actually, when I'd suggested this, I'd had something more complicated in mind (and which we were using), but route might be simpler

Like in a multi-VM Vagrantfile definition, set:
vm.config.define "vagrant-drupal"

Then run "vagrant ssh_config >> ~/.ssh/config", and it will set the host shorthand to "vagrant-drupal"

You can now run "ssh vagrant-drupal" from anywhere on the system to ssh in, and should be able to use this in a general, catch-all drush alias file? Haven't implemented it myself, but I used the ">>" bit all the time, so should work :)