--- - name: "[OpenRC] Start and enable service: zigbee2mqtt" service: name: zigbee2mqtt enabled: yes state: started when: - ansible_service_mgr == "openrc" - name: "[systemd] Start and enable service: zigbee2mqtt" systemd: name: zigbee2mqtt enabled: yes state: started when: - ansible_service_mgr == "systemd"