emyl / vagrant-triggers

Allow the definition of arbitrary scripts that will run on the host before and/or after Vagrant commands.
MIT License
546 stars 35 forks source link

run_remote in different machine #72

Closed rgl closed 6 years ago

rgl commented 8 years ago

For running a command in a different machine that triggered the trigger I'm resorting to:

config.trigger.after :up, :vm => ['ubuntu'] do
  run "vagrant ssh -c 'cat /vagrant/tmp/*.ssh_known_hosts | sudo tee /etc/ssh/ssh_known_hosts' jenkins"
end

But it would be really nice to be able to call run_remote on a given machine, in my case, on the jenkins machine.