puppetlabs-stdlib
puppetlabs-stdlib copied to clipboard
file_line extension for multiple matches
Use Case
My request is to introduce another parameter, that ensures that there is only one occurrence of a line that can be matched by the pattern and deletes the rest. file_line with multiple = true will replace all lines, but doesn't do a cleanup.
Describe the Solution You Would Like
A new attribite for file_line called "unique". The attribute unique could have several values to control its behaviour, for example first … changes the first occurrence, all matches after the first last … deletes all ocurrences but the last, the last one is updated
Describe Alternatives You've Considered
Nothing
Additional Context
Because config files have been managed by hand until now, inconsistencies and errors the parameter naming (small vs. capital letters, type-errors, double entries) happened all over the place, so that we need a strict way of enforcing the profiles correctness.
Because config files have been managed by hand until now, inconsistencies and errors the parameter naming (small vs. capital letters, type-errors, double entries) happened all over the place, so that we need a strict way of enforcing the profiles correctness.
Best way to do this is to manage the entire file.
Probably yes, but in that case its not possible yet. Maybe later but currently we need to manage settings one-by-one.
Hello! 👋
This issue has been open for a while and has had no recent activity. We've labelled it with attention-needed so that we can get a clear view of which issues need our attention.
If you are waiting on a response from us we will try and address your comments on a future Community Day.
Alternatively, if it is no longer relevant to you please close the issue with a comment.