Sign inSign up

roobert/erb-hiera

By roobert

•Updated over 8 years ago

https://github.com/roobert/erb-hiera

Image
0

510

roobert/erb-hiera repository overview

⁠erb-hiera

⁠About

Generate documents from a scope, ERB template(s) and Hiera Data

⁠Install

gem install erb-hiera

⁠Usage

$ ./bin/erb-hiera --help
Options:
  -m, --mapping-config=<s>    specify mapping config file
  -c, --hiera-config=<s>      specify hiera config file
                               
  -i, --input=<s>             override input config options
  -o, --output=<s>            override output config options
                               
  -s, --scope=<s>             override the lookup scope
  -v, --variables=<s>         override facts
                               
  --dry-run                   don't write out files
                               
  --verbose                   print compiled templates
  --debug                     enable hiera logging and print backtrace on error
                               

⁠Example

cd example
erb-hiera --mapping-config mapping.yaml --hiera-config hiera.yaml --verbose

# render a specific template using injected erb scope (outputs only to stdout)
erb-hiera --mapping-config mapping.yaml --hiera-config hiera.yaml --scope '{ "environment": "prod" }' -o -

# use normal lookup path but override a fact at the top level
erb-hiera --mapping-config mapping.yaml --hiera-config hiera.yaml --variables '{ "environment::description": "override description" }' -o -

⁠References

Tag summary

Content type

Image

Digest

Size

76.6 MB

Last updated

over 8 years ago

docker pull roobert/erb-hiera