Hi Friends,
How do I set windows service recovery on. failure,
suppose x service stopped due to failure, it needs to started automatically by creating recovery condition with. ansible windows service?
How do I do that ?
Thanks
vinod
Hi Friends,
How do I set windows service recovery on. failure,
suppose x service stopped due to failure, it needs to started automatically by creating recovery condition with. ansible windows service?
How do I do that ?
Thanks
vinod
I thought someone had added recovery actions to win_service module, but maybe that PR never got finished, or I am confused with dependent services.
I think you would have to use script module and some powershell to set recovery actions. You could maybe use sc.exe too if you are in a hurry, although it would repeat the command every time you run the playbook. Maybe that doesn’t matter though, it depends on what you need to get done.
Hope this helps,
Jon
It was added witht he PR https://github.com/ansible-collections/ansible.windows/pull/40 which is the ‘win_service’ module in the ansible.windows collection. This collection is officially meant to be the source of supported Windows module in Ansible 2.10 and onwards but you might be able to use it for Ansible 2.9.
Thanks
Jordan
Thank you so much Hawkesworth
Thank you so much Jordan,
I found these options,