-
Notifications
You must be signed in to change notification settings - Fork 303
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
Allow user defined tag or list of tags #790
base: main
Are you sure you want to change the base?
Conversation
I wanna add a comment to unit testing and acceptance testing: I'm actually pretty unsure how to treat this here. |
This will clash with the |
Uhm, is this a clash (actually this was on purpose)? |
Ahhh, now I'm getting what you're pointing to. Think you wanna avoid the server side warning for the defined types, right?
I was trying to stick the param names as close as possible to the way the native code works. IMHO this makes it more understandable. |
Anyone seeing any more issues? |
@Lightning- i think i may be missing something how is this new parameter different from the current tag metaparameter? i.e. you can currently do node "exporting_host" {
@@concat::fragment { 'foobar':
path => /foo/bar
tag => ['foobar']
}
}
node "importing_host" {
Concat::fragment < tag == 'foobar' >
} |
Yes, this works but is not what my change is about: concatenating a single one (concat)file from fragments with different tags is the important change here. The changes to the native types are the relevant feature addition. Basically explained here: https://github.com/Lightning-/puppetlabs-concat/blob/feature_taglist/lib/puppet/type/concat_file.rb#L26-L34 |
I don't wanna be annoying but may I kindly ask if we could get this processed? I'd love to get the official repo aligned to my branch and move my production environments back to there 😇 |
98c4c81
to
1594360
Compare
make it possible to concatenate fragments identified by different tags into a file; allow parameter "tag" of type "concat_file" to be a string or array of strings therefore additionally handle nonexistent tags (as being optional in both native types) correctly
allow a user defined tag for a fragment; keep previous default behavior if not supplied
allow a user defined tag or list of tags for fragments to build the concat_file out of
avoid potential problems and warnings by overlapping with the metaparameter "tag"
1594360
to
8c278b9
Compare
8c278b9
to
f5dea19
Compare
Summary
speaking: allow a
concat_file
to get assembled of fragments matching the list of tagstag
(optionally) configurable for the Puppet defined types (concat
/concat::fragment
)Additional Context
Generating fragments for a target path is one thing but generating snippets in a more "neutral" or "generic" way (not tied to the path) has plenty of additional use cases not covered by this method. Best example are multiple certificate authority hosts exporting a
concat_fragment
/concat::fragment
with a descriptive tag to PuppetDB for each CA certificate they are responsible for. A random manifest then can realize aconcat_file
/concat
gathering a list of tags (e.g.['cacert_intermediate_2', 'cacert_intermediate_1', 'cacert_root']
).Actually that was my initial use case when I was patching the native types many years ago and I'm running these patches for years now ;). Time to contribute!
I kept the original behavior of the defined types by making the
tag
parameter(s) optional and stick with the current default(s) if not used. That way it's a bare feature addition that shouldn't break any scenario out there.