After some thinking I've realized that second option is not an option at all. As we want to start service during systemd role runtime, but we also want to restart it afterwards.
UPD: we can't compare to 'stopped' as in case it's state == 'restarted' or 'reloaded' - it will be restarted twice. So then we should compare to 'started'
Eventually more proper fix would be 1st option, but that requires patching of all existing roles. And indeed it's unobvious for usage outside of the osa. And this single condition change should be quite backportable as well.
After some thinking I've realized that second option is not an option at all. As we want to start service during systemd role runtime, but we also want to restart it afterwards.
So I'm replacing second option with following one: results. item.state is not defined' OR services_ results. item.state == 'started'" /opendev. org/openstack/ ansible- role-systemd_ service/ src/commit/ 59736cb4af53302 60bb456e454e08e 3d1c9da607/ handlers/ main.yml# L33
2. Change systemd role condition to:
"'services_
https:/
UPD: we can't compare to 'stopped' as in case it's state == 'restarted' or 'reloaded' - it will be restarted twice. So then we should compare to 'started'
Eventually more proper fix would be 1st option, but that requires patching of all existing roles. And indeed it's unobvious for usage outside of the osa. And this single condition change should be quite backportable as well.