--- - name: "[Alpine/OpenRC] Restart service: networking" service: name: networking state: restarted when: - ansible_service_mgr == "openrc" listen: "Restart networking" - name: "[OpenRC] Restart service: chronyd (to deploy config changes)" service: name: chronyd state: restarted when: - ansible_service_mgr == "openrc" listen: "Restart chrony" - name: "[OpenRC] Restart service: node-exporter (to deploy config changes)" service: name: node-exporter state: restarted when: - ansible_service_mgr == "openrc" listen: "Restart prometheus-node-exporter" - name: "[systemd] Restart service: prometheus-node-exporter (to deploy config changes)" systemd: name: prometheus-node-exporter state: restarted when: - ansible_service_mgr == "systemd" listen: "Restart prometheus-node-exporter"