Sha256: 7a6cfd7c80cff8805a9d4fead733b03d2595c7eec7b4f799700b43e74fac5f90
Contents?: true
Size: 506 Bytes
Versions: 1
Compression:
Stored size: 506 Bytes
Contents
command :'exec host' do |c| c.summary = 'Execute a command in host' c.description = "Execute a command in host defined by DNS_name" c.syntax = 'ops exec [host_name] "[command]"' c.example "List containers in host", "ops exec example.com 'docker ps -a'" c.action do |args, options| host = args[0] user = Ops::get_user_for(host) Net::SSH.start(host, user) do |ssh| Docker::containers_for(host).each do |container_name, config| ssh.exec args[1] end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
open-dock-0.0.11 | lib/open-dock/commands/exec_host.rb |