#!/bin/sh ## ## gomplate-generate ## generate a configuration snippets from a template the convenient way: ## - reads the parameters in YAML format from stdin ## - reads the defaults for parameters in YAML format from template "$name:params" ## - reads the configuration snippets from template "$name:template" ## ## Example: ## ## $ cat templates.txt ## {{ define "hello:params" -}} ## type: lovely ## name: world ## {{ end -}} ## {{ define "hello:template" -}} ## Hello {{ .type }} {{ .name }}! ## {{ end -}} ## ## $ gomplate-generate template.txt hello