--- - name: "[OpenRC] Restart service: fritzbox-exporter (to deploy config changes)" service: name: fritzbox-exporter state: restarted when: - ansible_service_mgr == "openrc" listen: "Restart fritzbox-exporter" - name: "[systemd] Restart service: fritzbox-exporter (to deploy config changes)" systemd: name: fritzbox-exporter state: restarted when: - ansible_service_mgr == "systemd" listen: "Restart fritzbox-exporter"