Sha256: 2d9bf83f8e89fbee9a9f25a100332b1e8e8d0ea80dc8e47ea0415061b0f58820
Contents?: true
Size: 1.19 KB
Versions: 17
Compression:
Stored size: 1.19 KB
Contents
require 'rundock/operation/base' module Rundock module Operation # You can use this as following scenario.yml for example. # # - node: localhost # deploy: # - src: /tmp/deploy_from_local_file # dst: /tmp/deploy_dest_local_file # - src: /tmp/deploy_from_local_dir # dst: /tmp/deploy_dest_local_dir # - node: anyhost-01 # deploy: # - src: /tmp/deploy_from_local_file # dst: /tmp/deploy_dest_remote_file # - src: /tmp/deploy_from_local_dir # dst: /tmp/deploy_dest_remote_dir # --- # anyhost-01: # host: 192.168.1.11 # ssh_opts: # port: 22 # user: anyuser # key: ~/.ssh/id_rsa # --- class Deploy < Base def run(backend, attributes) options = attributes[:deploy] options.each do |path| Logger.error('src: options not found.') if !path[:src] || path[:src].blank? Logger.error('dst: options not found.') if !path[:dst] || path[:dst].blank? Logger.info("deploy localhost:#{path[:src]} remote:#{attributes[:nodeinfo][:host]}:#{path[:dst]}") backend.send_file(path[:src], path[:dst]) end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems