Closed japsu closed 5 years ago
Does it make sense to include multi-document templates?
I think
!Include
path: ./foo.xyx
multi: true
or
!MultiInclude ./foo.xyx
makes sense. It could expand into multiple top-level documents where supported (YAML output) or a plain list where not.
Include multiple files by glob?
Definitely makes sense. Makes it easy to do ./conf.d
style things too (with the hopefully obvious requirement that the tag sorts the list of filenames before including them).
(Actually, for better composability, maybe just a !Glob
tag and !Include
accepting a list of filenames?)
TODO:
determine_format
up fromemrichen.__main__
toTemplate.parse
?)!Defaults
over!Include
FileNotFoundError: [Errno 2] No such file or directory: 'subdir/subdir/foo.in.yml'
on!Include subdir/foo.in.yml
after!Include subdir/bar.in.yml
on top level)Further improvement:
!Include
happens at the top level of the root template?!Include resources/*.in.yml
in a Kubernetes template, with each includee hosting one (or more?) CRDs.