2 things;

1. That's a bash script and not a batch file, simply changing the extension 
from .sh to .bat will not work
2. Processes spawned in WinRM are killed once the parent process exist

1 is either you copied the wrong script or are using the wrong file, I 
can't help you there. 2 can be overcome in multiple ways;

1. Use async to run the process in the background that is escaped from the 
WinRM job, this must have a timeout and cannot be run indefinitely
2. Use the proper way of putting this in a scheduled task or Windows 
service and run it that way

You really should be using a scheduled task or Windows server to run this 
as it has fine controls over error actions, scheduling and the like. This 
isn't designed to be run directly from Ansible except maybe for debugging 
purposes.

Thanks

Jordan

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9b421441-5041-4038-acd3-3afbbcd25be3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to