[FEATURE REQUEST] Add a rmdir state
nicholasmhughes opened this issue · comments
Is your feature request related to a problem? Please describe.
There isn't really a good native solution for "remove all empty directories in this tree".
Describe the solution you'd like
A native rmdir state which can delete empty directories below a given root.
Describe alternatives you've considered
Usually this problem is solved with some Jinja gymnastics to find empty directories and pass to file.absent
, but that can be dangerous if the find operation is too broad as file.absent
essentially performs the equivalent of rm -rf
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.