Class: Kitchen::Transport::Ssh::Connection
- Inherits:
-
Object
- Object
- Kitchen::Transport::Ssh::Connection
- Defined in:
- lib/kitchen/provisioner/chef_zero_nodes.rb
Instance Method Summary collapse
-
#download(remote, local) ⇒ Object
Download JSON node file from instance to node_path over SCP.
Instance Method Details
#download(remote, local) ⇒ Object
Download JSON node file from instance to node_path over SCP
83 84 85 86 87 88 89 |
# File 'lib/kitchen/provisioner/chef_zero_nodes.rb', line 83 def download(remote, local) FileUtils.mkdir_p(File.dirname(local)) session.scp.download!(remote, local, {}) logger.debug("Downloaded #{remote} to #{local}") rescue Net::SSH::Exception => ex raise SshFailed, "SCP download failed (#{ex.})" end |