lib/bolt/application.rb
# Run a script on a list of targets.
#
# @param script [String] The path to the script to run.
# @param targets [Array[String]] The targets to run on.
# @param arguments [Array[String], NilClass] Arguments to pass to the script.
# @param env_vars [Hash] Environment variables to set on the target.
# @return [Bolt::ResultSet]
#
Run a script on a list of targets.
Run a script on a list of targets .
def run_script(script, targets, arguments: [], env_vars: nil)
      script = find_file(script)
      Bolt::Util.validate_file('script', script)
      with_benchmark do
        executor.run_script(inventory.get_targets(targets), script, arguments, env_vars: env_vars)
      end
    end
def run_script ( script , targets , arguments : [ ] , env_vars : nil ) script = find_file ( script ) Bolt :: Util . validate_file ( 'script' , script ) with_benchmark do executor . run_script ( inventory . get_targets ( targets ) , script , arguments , env_vars : env_vars ) end end
Run a script on a list of targets.
Run a script on a list of targets .
None
Bolt::ResultSet
script
The path to the script to run.
The path to the script to run .
targets
] The targets to run on.
] The targets to run on .
arguments
, NilClass] Arguments to pass to the script.
NilClass ] Arguments to pass to the script .
env_vars
Environment variables to set on the target.
Environment variables to set on the target .