Sha256: 5bc44b53a76fdf01e0a22c3576ca3301193fc72b8e3278add9c095d7d89bf928

Contents?: true

Size: 473 Bytes

Versions: 12

Compression:

Stored size: 473 Bytes

Contents

require 'yaml'
require 'subspace/inventory'
class Subspace::Commands::Exec < Subspace::Commands::Base
  PASS_THROUGH_PARAMS = ["i"]

  def initialize(args, options)
    @host_spec = args[0]
    @command = args[1]
    @user = options.user
    @options = options
    run
  end

  def run
    hosts = inventory.find_hosts!(@host_spec)

    say "> Running `#{@command}` on #{hosts.join ','}"
    ansible_command "ansible", @host_spec, "-m", "command", "-a", @command
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
subspace-3.0.13 lib/subspace/commands/exec.rb
subspace-3.0.12 lib/subspace/commands/exec.rb
subspace-3.0.11 lib/subspace/commands/exec.rb
subspace-3.0.10 lib/subspace/commands/exec.rb
subspace-3.0.9 lib/subspace/commands/exec.rb
subspace-3.0.6 lib/subspace/commands/exec.rb
subspace-3.0.5 lib/subspace/commands/exec.rb
subspace-3.0.4 lib/subspace/commands/exec.rb
subspace-3.0.3 lib/subspace/commands/exec.rb
subspace-3.0.2 lib/subspace/commands/exec.rb
subspace-3.0.0 lib/subspace/commands/exec.rb
subspace-3.0.0.rc1 lib/subspace/commands/exec.rb