--- - name: Check if sispmctl already exists ansible.builtin.stat: path: /usr/bin/sispmctl register: sispmctl_file - name: Install dependencies ansible.builtin.apt: name: "libusb-dev" cache_valid_time: "7200" state: present - name: Copy sispmctl sources ansible.builtin.unarchive: src: sispmctl-4.7.tar.gz dest: /tmp when: not sispmctl_file.stat.exists - name: Build and install ansible.builtin.shell: cd /tmp/sispmctl*/ && ./configure --prefix=/usr && make install when: not sispmctl_file.stat.exists changed_when: true - name: Install systemd service file ansible.builtin.copy: src: sispmctl.service dest: /lib/systemd/system/ - name: Add script to autostart and start now ansible.builtin.systemd: name: sispmctl state: started enabled: "yes" daemon_reload: "yes" - name: Add to sysdweb ansible.builtin.include_role: name: pi_sysdweb vars: sysdweb_name: sispmctl