Best way to capture SSH output within a Vagrant plugin
18 views
Skip to first unread message
Luis Bosque
unread,
Feb 22, 2016, 9:21:22 AM2/22/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Vagrant
Hi,
I'm writing a vagrant plugin that runs some commands through SSH in the instance and tries to do different things based on the output of those commands. I'm using "vm.action :ssh_run" to run the ssh comands but I'm having difficulties to capture the output of the SSH command. After taking a look to lib/vagrant/action/builtin/ssh_run.rb and lib/vagrant/util/ssh.rb I can't see clear way to get this output. What's is the best way to do this?