yaml_env: Load environment variables from a yaml file

Description Usage Arguments Details

Description

Load environment variables from a yaml file. This is a hack for a project. It may change and may move package. callr would be a better fit probably, but callr doesn't pull in yaml yet so I don't know that it's a good fit.

Usage

1
yaml_env(filename, section = NULL)

Arguments

filename

Name of the file

section

An optional section of the file to load

Details

The yaml file must be sets of key/value pairs of simple data types. Something like:

1
REDIS_HOST: localhost

Alternatively, for use with section, add an extra layer of nesting:

1
2
3
4
local:
  REDIS_HOST: localhost
remote:
  REDIS_HOST: redis.marathon.mesos

traitecoevo/rrqueue documentation built on May 31, 2019, 7:44 p.m.