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

[FEATURE REQUEST] file.recurse: allow merging directories from source list #67072

Open
lkubb opened this issue Nov 27, 2024 · 0 comments · May be fixed by #67073
Open

[FEATURE REQUEST] file.recurse: allow merging directories from source list #67072

lkubb opened this issue Nov 27, 2024 · 0 comments · May be fixed by #67073
Labels
Feature new functionality including changes to functionality and code refactors, etc. needs-triage

Comments

@lkubb
Copy link
Contributor

lkubb commented Nov 27, 2024

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) a file 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 other file 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 existing source items.

Describe alternatives you've considered
Duplicating/symlinking these kinds of source directories, which is very inconvenient.

Additional context
PR incoming

@lkubb lkubb added Feature new functionality including changes to functionality and code refactors, etc. needs-triage labels Nov 27, 2024
@lkubb lkubb changed the title [FEATURE REQUEST] file.recurse: allow merging files from source list [FEATURE REQUEST] file.recurse: allow merging directories from source list Nov 27, 2024
@lkubb lkubb linked a pull request Nov 27, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature new functionality including changes to functionality and code refactors, etc. needs-triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant