Sha256: ec75d52f4c319ee22a64624abef7bb139b50aa4470ec3eea9ef974d93d22d90f

Contents?: true

Size: 611 Bytes

Versions: 9

Compression:

Stored size: 611 Bytes

Contents

command :'unship host' do |c|
  c.summary = 'Removes all Docker containers defined for the host in '#{Ops::CONTAINERS_DIR}/[host_name].yml'
  c.syntax = 'ops ship host [host_name]'
  c.description = "Removes all Docker containers defined for the host in '#{Ops::CONTAINERS_DIR}/[host_name].yml"
  c.example "", 'ops unship host example.com'
  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 "docker rm -f #{container_name}"
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
open-dock-0.0.10 lib/open-dock/commands/unship_host.rb
prun-ops-0.0.9 lib/prun-ops/commands/unship_host.rb
prun-ops-0.0.8 lib/prun-ops/commands/unship_host.rb
prun-ops-0.0.7 lib/prun-ops/commands/unship_host.rb
prun-ops-0.0.6 lib/prun-ops/commands/unship_host.rb
prun-ops-0.0.5 lib/prun-ops/commands/unship_host.rb
prun-ops-0.0.4 lib/prun-ops/commands/unship_host.rb
prun-ops-0.0.3 lib/prun-ops/commands/unship_host.rb
prun-ops-0.0.2 lib/prun-ops/commands/unship_host.rb