Sha256: 572c3cc3a1ad0e9dea7a3655d76fc46302c00a994ad42bd42752855ed409f3aa
Contents?: true
Size: 493 Bytes
Versions: 9
Compression:
Stored size: 493 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 [host_name] "[command]"' c.example "", "ops exec host 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
9 entries across 9 versions & 2 rubygems