Open drfuzzyness opened 9 months ago
+1 for this suggestion please. I'm using nssm to install hashicorp vault agent which requires redirection of stdout and stderr to get logging. If the service crashes and restarts, the previous logs are lost which makes debugging very hard.
SUMMARY
It would be helpful if the
community.windows.win_nssm
module can expose NSSM'sAppStdoutCreationDisposition
andAppStderrCreationDisposition
properties so that logs can be preserved when a service restarts. See "File Rotation Tab" on the NSSM usage page for a small amount of extra information.ISSUE TYPE
COMPONENT NAME
community.windows.win_nssm
ADDITIONAL INFORMATION
This would pass an integer (2 or 4 are known valid options) directly to NSSM's service configuration.
AppStdoutCreationDisposition
andAppStderrCreationDisposition
can be set independently, but follow similar logic. They should default to the current behavior of setting the -value to2
(replace log files on restart).Current behavior: https://github.com/ansible-collections/community.windows/blob/03e3af7baf85c2b14e558d3b9f1659712a3c6891/plugins/modules/win_nssm.ps1#L494-L495
Proposed configuration example: