Please see the API documentation for Capture(): http://rubydoc.info/github/capistrano/capistrano/master/Capistrano/Configuration/Actions/Inspect:capture
And, perhaps more usefullly: http://rubydoc.info/github/capistrano/capistrano/master/Capistrano/Configuration/Actions/Invocation:run Where you end up, eventually - notice the option list for run(). - Lee On 15 December 2011 09:54, Aurimas Sabaitis <[email protected]>wrote: > Hi, > > Is there any way to force host in capture command when it executed > from task > > Basically I need: > > task :aaa do > > # Get variable from other host > remote_var = capture("echo $xxx", :hosts=>"192.168.0.1") > > # Set to current host > run("echo #{remote_var} > some_file") > > end > > And I executing task from capistrano shell: > > cap> on 192.168.0.2 !namespace:aaa > > -- > * You received this message because you are subscribed to the Google > Groups "Capistrano" group. > * To post to this group, send email to [email protected] > * To unsubscribe from this group, send email to > [email protected] For more options, visit this > group at http://groups.google.com/group/capistrano?hl=en -- * You received this message because you are subscribed to the Google Groups "Capistrano" group. * To post to this group, send email to [email protected] * To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/capistrano?hl=en
