Method: VagrantBolt.command

Defined in:
lib/vagrant-bolt.rb

.command(command, env, machine, **args) ⇒ nil

Run a bolt command with the specified parameters

Examples:

VagrantBolt.command('/bin/echo "test"', env, machine, run_as: "root")

Parameters:

  • command (String)

    The command to run

  • env (Object)

    The environment

  • machine (Object)

    The machine

  • args (Hash)

    A optional hash of bolt config overrides. No merging will be done with these overrides.

Returns:

  • (nil)


45
46
47
48
# File 'lib/vagrant-bolt.rb', line 45

def self.command(command, env, machine, **args)
  runner = VagrantBolt::Runner.new(env, machine)
  runner.run(:command, command, **args)
end