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