Sha256: df0f6f9c1037dab6a0c92125f2363117798df91af1f8b9e35f26b0dea7ece9e0

Contents?: true

Size: 619 Bytes

Versions: 78

Compression:

Stored size: 619 Bytes

Contents

# What is This?

Patterns for best-use solutions to (not so) common problems

## How do i set persistent environment variables on a SUT, such as PATH?

```ruby
    host.add_env_var('PATH', '/opt/puppetlabs/bin:$PATH')
```

## How do i run commands on a SUT as a non-root user?

(warning) this should be abstracted into a beaker helper, or part of `on()`: BKR-168 - Beaker::DSL::Helpers needs "as" method READY FOR ENGINEERING

Create the user, then `su` with `--command`:

```ruby
    on(host, puppet("resource user #{username} ensure=present managehome-true"))
    on(host, "su #{username} --command '#{command}'")
```

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
beaker-6.4.1 docs/how_to/recipes.md
beaker-6.4.0 docs/how_to/recipes.md
beaker-6.3.0 docs/how_to/recipes.md
beaker-6.2.0 docs/how_to/recipes.md
beaker-6.1.0 docs/how_to/recipes.md
beaker-5.8.1 docs/how_to/recipes.md
beaker-4.42.0 docs/how_to/recipes.md
beaker-5.8.0 docs/how_to/recipes.md
beaker-5.7.0 docs/how_to/recipes.md
beaker-4.41.2 docs/how_to/recipes.md
beaker-4.41.1 docs/how_to/recipes.md
beaker-5.6.0 docs/how_to/recipes.md
beaker-4.41.0 docs/how_to/recipes.md
beaker-5.5.0 docs/how_to/recipes.md
beaker-5.4.0 docs/how_to/recipes.md
beaker-5.3.1 docs/how_to/recipes.md
beaker-4.40.2 docs/how_to/recipes.md
beaker-5.3.0 docs/how_to/recipes.md
beaker-4.40.1 docs/how_to/recipes.md
beaker-5.2.0 docs/how_to/recipes.md