sous-chefs/logrotate

Is Windows support feasible?

jjustice6 opened this issue · 2 comments

I see there's a Windows logrotate cookbook: https://supermarket.chef.io/cookbooks/windows_logrotate

Would it be feasible for Windows support to be included in the logrotate_app resource, or are they too far apart for that to be viable?

@jjustice6 Taking a /quick/ look at the examples in the README, it seems that it may be feasible given that the configuration formats look similar. I'd happily take a well-written contribution that adds windows support, but as I don't use windows regularly at all, I can't commit to supporting it myself.

This is doable, and made much easier by using a powershell module that's directly compatible with logrotate's config format - https://www.powershellgallery.com/packages/Log-Rotate/1.5.4.

It's mostly a matter of getting the PS module and 7zip (for compression) installed, and then some minor setup. I won't pretend to have done it the right way because I mostly live in the linux world.