[FEATURE REQUEST] file.recurse: allow merging directories from source list
#67338
lkubb
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
I often make use of a pattern called TOFS, where a list of
sourcepaths depending on minion metadata is passed to (usually) afilestate. This allows to have default files and override them on specific systems.The
file.recursestate already handles source lists, but - in line with otherfilestates, which only handle single files - only selects the first existing source for recursively updating a directory. This means that, e.g., when I have a default/etc/nginxconfiguration and I want to add a single file for specific systems, I have to duplicate the whole directory.Describe the solution you'd like
The
file.recursestate should have an optional switch that makes it recursively merge existingsourceitems.Describe alternatives you've considered
Duplicating/symlinking these kinds of
sourcedirectories, which is very inconvenient.Additional context
PR incoming
Beta Was this translation helpful? Give feedback.
All reactions