[FEATURE REQUEST] file.recurse
: allow merging directories from source list
#67072
Labels
file.recurse
: allow merging directories from source list
#67072
Is your feature request related to a problem? Please describe.
I often make use of a pattern called TOFS, where a list of
source
paths depending on minion metadata is passed to (usually) afile
state. This allows to have default files and override them on specific systems.The
file.recurse
state already handles source lists, but - in line with otherfile
states, 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/nginx
configuration 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.recurse
state should have an optional switch that makes it recursively merge existingsource
items.Describe alternatives you've considered
Duplicating/symlinking these kinds of
source
directories, which is very inconvenient.Additional context
PR incoming
The text was updated successfully, but these errors were encountered: