[FEATURE REQUEST] Support for deleting unconfigured lines in file.keyvalue
#67686
tacerus
started this conversation in
Feature Requests
Replies: 1 comment
-
This is what |
Beta Was this translation helpful? Give feedback.
0 replies
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
Currently the
file.keyvalue
state function only allows for either the modification of existing lines, or the addition of new lines.It would be great if it could be used to prune lines not passed to be configured.
Describe the solution you'd like
Add an optional argument, such as
clean
, which, if set totrue
, enables the deletion of lines not passed viakey_values: {}
.Describe alternatives you've considered
Use additional states with dependency logic to prune the file before executing
file.keyvalue
.Use
file.managed
and construct the key value pairs manually .Additional context
I will submit a proposed patch.
Please Note
If this feature request would be considered a substantial change or addition, this should go through a SEP process here https://github.com/saltstack/salt-enhancement-proposals, instead of a feature request.
Beta Was this translation helpful? Give feedback.
All reactions