I have Windows server that have an EXE pushed to them via Ansible, and then 
that EXE is associated with a Windows Service (also via Ansible).

So the playbook goes:

Copy EXE to host (win_copy)
Create and start service (win_service)

The problem:

Once the service is running, that EXE is now in use. If I need to push out 
a new EXE, I need to stop the service first. I need the workflow to be:

If EXE has changed, then stop service BEFORE copying EXE.

The "Create and start service" task should then ensure the service is 
started again if it was stopped, so that can stay the same.


I guess I need a "reverse handler" of sorts? Instead of executing a handler 
after a change, I need to execute a handler before a change.

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/4014135d-60df-4a30-9a4f-172569d667af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to