lib/bolt/application.rb
# Run a command on a list of targets.
#
# @param command [String] The command.
# @param targets [Array[String]] The targets to run on.
# @param env_vars [Hash] Environment variables to set on the target.
# @return [Bolt::ResultSet]
#
Run a command on a list of targets.
Run a command on a list of targets .
def run_command(command, targets, env_vars: nil)
      targets = inventory.get_targets(targets)
      with_benchmark do
        executor.run_command(targets, command, env_vars: env_vars)
      end
    end
def run_command ( command , targets , env_vars : nil ) targets = inventory . get_targets ( targets ) with_benchmark do executor . run_command ( targets , command , env_vars : env_vars ) end end
Run a command on a list of targets.
Run a command on a list of targets .
None
Bolt::ResultSet
command
None
targets
] The targets to run on.
] The targets to run on .
env_vars
Environment variables to set on the target.
Environment variables to set on the target .