My role have two handlers: start service and restart service. I want to run start service only if service was installed, and I want to restart service if I changed service configuration file.
(That were normal ansible handlers, now complicated part starts)
I want to avoid doing restart if I start application (started handler was executed).
Basically, if:
1. package was installed
2. config was changed
=> start service
if:
1. package wasn't changed
2. config was changed
=> restart service
I tried to play with listen
, but it's designed for different purposes and can't help here.
Can someone give me an idea who to do this?