Sha256: 593567a98b50ec8ad0e295e1f9657fd7c8de496cdb97165b40ba9c580be37f83

Contents?: true

Size: 1.62 KB

Versions: 6

Compression:

Stored size: 1.62 KB

Contents

Beaker commands are executed through an ssh connection to each individual SUT.  Various options are supported during command execution that control how the commands themselves are executed, what output is generated and how results are interpreted.

## :acceptable_exit_codes

Provide either a single or an array of acceptable/passing exit codes for the provided command.  Defaults to the single exit code `0`.

    on host, puppet( 'agent -t' ), :acceptable_exit_codes => [0,1,2]

## :accept_all_exit_codes

Consider any exit codes returned by the command to be acceptable/passing.  Defaults to `nil`/`false`.

    on host, puppet( 'agent -t' ), :accept_all_exit_codes => true

## :expect_connection_failure

Assume that this command will cause a connection failure.  Used for `host.reboot` so that Beaker can handle the broken ssh connection.

    on host, "reboot", {:expect_connection_failure => true}

## :dry_run

Do not actually execute this command on the SUT.  Defaults to `false`.

    on host, "don't do this crazy thing", {:dry_run => true}

## :pty

Should this command be executed in a pseudoterminal?  Defaults to `false`.

    on host, "sudo su -c \"service ssh restart\"", {:pty => true})

## :silent

Do not output any logging for this command.  Defaults to `false`.

    on host, "echo hello", {:silent => true}

## :stdin

Specifies standard input to be provided to the command post execution.  Defaults to `nil`.

    on host, "this command takes input", {:stdin => "hiya"}

## [:run_in_parallel](how_to/run_in_parallel.md)

Execute the command against all hosts in parallel

    on hosts, puppet( 'agent -t' ), :run_in_parallel => true

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
beaker-2.52.0 docs/concepts/shared_options_for_executing_beaker_commands.md
beaker-2.51.0 docs/concepts/shared_options_for_executing_beaker_commands.md
beaker-2.50.0 docs/concepts/shared_options_for_executing_beaker_commands.md
beaker-2.49.0 docs/concepts/shared_options_for_executing_beaker_commands.md
beaker-2.48.1 docs/concepts/shared_options_for_executing_beaker_commands.md
beaker-2.48.0 docs/concepts/shared_options_for_executing_beaker_commands.md