I have a systemd service unit with OnCalendar timer assigned to it. That service invokes JVM, which runs code, that has to be started only on a specific schedule.
This systemd unit (and several others) are managed by the ansible playbook, which uses openstack/ansible-role-systemd_service role. It restarts systemd services every time I make some changes in their unit files.
Also, there's a handler, which restarts all the services every time Gitlab CI pipeline runs this ansible playbook and uploads a new .jar artifact to a server.
Is there any systemd built-in mechanism to restrict restarting service with timer assigned to it? Still, I have to be able to stop/start those services manually when it's needed.
Seems like I can fork that ansible role and add some check, but I wonder for some native and more straight-forward way to achieve this.