-
Notifications
You must be signed in to change notification settings - Fork 24k
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
New Module: Manage Windows event logs (win_eventlog) #27827
Conversation
@SamLiu79 @timothyvandenbrande @andrewsaraceni @angstwad @ar7z1 @blakfeld @brianlloyd @chrishoffman @daBONDi @elventear @if-meaton @joshludwig @petemounce @rndmh3ro @schwartzmx @smadam813 As a maintainer of a module in the same namespace this new module has been submitted to, your vote counts for shipits. Please review this module and add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty happy with how this looks, the only bits of feedback I have which doesn't need to stop merging this in if others don't agree are
- should this be split up into 2 modules, one to manage the log and another to manage the sources of the logs
- The choices for
overflow_action
aren't in snake_case, it looks easier the way you have it with direct mappings to the cmdlet values but should this be more in line with Ansible's style?
I'll let others see if they agree or disagree with anything I've said. Thanks for the awesome work.
shipit |
Thanks @jborean93! I actually explored splitting them into a separate module for logs and sources initially, but there's some pretty tight coupling between the two, e.g. the fact that a log cannot be created without a source. You'd have to provide the Additionally, the fact that the default (i.e. same-named) source for the log cannot be modified after creation would've seemingly made a sources module less usable in certain cases, and an arguably more awkward workflow for dealing with CRUDing logs/sources overall, so I decided to stick with one considering how they're managed in PowerShell. Happy to hear others' thoughts on this though. |
That sounds fair enough, sounds like it should be one module. |
SUMMARY
Currently, no module exists for managing Windows event logs, as discussed in #26825. This module allows for the addition, clearing and removal of event logs and their associated sources. Additional settings for logs and sources can also be specified and applied, including:
category_file
message_file
parameter_file
maximum_size
overflow_action
retention_days
Integration tests and check-mode support are both included.
ISSUE TYPE
COMPONENT NAME
lib/ansible/modules/windows/win_eventlog.ps1
ANSIBLE VERSION
ADDITIONAL INFORMATION