Process all gomplate.yaml files in a directory #1258
-
Is there a way, from the command line, to process all gomplate.yaml files in a directory? I was hoping to have an automated process to be able to just add more configs and have them automatically generate the output files. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
By 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 Please let me know if this answers the question - if not, let me know what's different about your specific use-case! |
Beta Was this translation helpful? Give feedback.
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:If you want to process a number of templates in the same execution, you could use
--input-dir
(orinputDir
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!