Join GitHub today
Add support for running commands over vagrant ssh #4348
This adds support for a vagrant scheme, which uses vagrant to define ssh connection parameters via
This can either be used via a cli arg:
I'm not sure where best to document that, let me know if I can help with that.
Don't know anything about vagrant but just going on the doc https://www.vagrantup.com/docs/cli/ssh.html the format for the command looks wrong - does this work for you @shadyvb ? It looks from the doc that the format should be something like:
$escaped_command = sprintf( 'vagrant ssh %s -c %s%s', escapeshellarg( $bits['host'] ), escapeshellarg( $wp_command ), $is_tty ? ' -- -t' : '' );
Thanks for investigating!
And yes it is working for me, been using it since.
Hmm, installed vagrant (1.9.1 on Ubuntu 17.04) and if I do
Sep 14, 2017
1 check passed
Thanks for the pull request, @shadyvb !
If you're interested in providing documentation, we have started gathering instructions for running commands remotely here: https://github.com/wp-cli/handbook/blob/master/running-commands-remotely.md
This does not contain the docker-specific scheme either, though.