--- - name: "[OpenRC] Enable and start service: radicale" service: name: radicale enabled: yes state: started when: - ansible_service_mgr == "openrc" - name: "[systemd] Enable and start service: radicale" systemd: name: radicale enabled: yes state: started when: - ansible_service_mgr == "systemd"