--- - name: "Create systemd-service file for serial2tcp" template: src: serial2tcp.service.j2 dest: /etc/systemd/system/serial2tcp.service mode: "0755" owner: root group: root notify: "Restart serial2tcp" when: - ansible_service_mgr == "systemd"