-
Notifications
You must be signed in to change notification settings - Fork 24
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
DRY configuration (aliases) #15
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've got a lot of 100% duplicated blocks in my configuration (because I MITM several
.deb
mirrors to my local apt-cacher-ng instance, exactly like https://github.com/tianon/rawdns/blob/b2cec4eeff1377afdfd8c90e5a4716eb82370a09/hacks/apt-cacher-ng.md, so whatever gets implemented here should be reflected there), so it'd be nice to have some way to say something like "configuration for this new host should be copied from that other host".I see two main ways to implement this:
Main pros: simple for users to write
Main cons: annoying to implement (
StringOrDomainConfig
, etc), inflexible for later enhancement(or
"type": "copy"
, but I'm not sure I like that -- being able to change even the "type" of what we've copied from seems fun -- maybe"merge": "host1."
is better to make it clear what's happening here)Main pros: flexible, saves code from needing complex unmarshalling for
StringOrDomainConfig
Main cons: slightly complex "merging" behavior
One thing to decide would be whether
"cnames": [ "1.2.3.4" ]
merged into"cnames": [ "5.6.7.8" ]
becomes[ "5.6.7.8" ]
or[ "1.2.3.4", "5.6.7.8" ]
.The text was updated successfully, but these errors were encountered: