Skip to content

Process all gomplate.yaml files in a directory #1258

Answered by hairyhenderson
theskipster asked this question in Q&A
Discussion options

You must be logged in to vote

By gomplate.yaml I assume you mean the .gomplate.yaml config file? The intent is to have a single config file for a single gomplate execution. You could probably script it like:

for config in mydir/*.yaml; do
  gomplate --config $config
done

If you want to process a number of templates in the same execution, you could use --input-dir (or inputDir in the config) - see https://docs.gomplate.ca/config/#inputdir. The advantage of doing that is you can share datasources/contexts. But that's obviously not always desired 😉.

Please let me know if this answers the question - if not, let me know what's different about your specific use-case!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by theskipster
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants