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