Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transclude other YAML files #117

Closed
pykong opened this issue Feb 18, 2020 · 1 comment · Fixed by #136
Closed

Transclude other YAML files #117

pykong opened this issue Feb 18, 2020 · 1 comment · Fixed by #136
Milestone

Comments

@pykong
Copy link
Collaborator

pykong commented Feb 18, 2020

As already described in #116, I like to think up a simpler and more robust way than PR #79.

I like to have a way to reuse settings across projects.
For example most of my projects run an identical chain of commands (e.g. start VE, init git, etc. ...).

Instead of allowing some complex folder inheritance as proposed by PR #79, which potentially opens a can of worms with many unknown side effects, simply allowing to reference other yaml files and their settings would cover most my use cases.

Potential ways to accomplish this are described here:
https://stackoverflow.com/questions/528281/how-can-i-include-a-yaml-file-inside-another

Or we employ Jinja for this purpose as well. That would make sense, as we are already including other files via Jinja.

@pykong pykong added this to the 3.0.0 milestone Feb 18, 2020
@yajo
Copy link
Member

yajo commented Feb 19, 2020

One solution would be to allow jinja inside copier.yml itself, but that'd be a simplified jinja that wouldn't include variables that will be later obtained from copier.yml itself.

Another solution would be to add a _include_manifests: key, which lets you include other files such as copier.01.yml, copier.02.yml, etc. All those get merged in order, and the final result is used as a single copier.yml file.

We really need #110 fixed, or it will keep complicating everything... 🤔

@pykong pykong changed the title Reference other YAML files from Transclude other YAML files Feb 26, 2020
This was referenced Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants