2020-05-10 15:25:38 +02:00
|
|
|
---
|
2020-05-12 20:51:04 +02:00
|
|
|
- name: Check if sispmctl already exists
|
|
|
|
stat: path=/usr/local/bin/sispmctl
|
|
|
|
register: sispmctl_file
|
2020-05-10 15:25:38 +02:00
|
|
|
- name: Install dependencies
|
2020-05-12 20:51:04 +02:00
|
|
|
apt: name="libusb-dev" cache_valid_time=7200 state=present
|
2020-05-10 15:25:38 +02:00
|
|
|
- name: Copy sispmctl sources
|
2020-05-12 20:51:04 +02:00
|
|
|
unarchive: src=sispmctl-4.7.tar.gz dest=/tmp
|
|
|
|
when: sispmctl_file.stat.exists == false
|
2020-05-10 15:25:38 +02:00
|
|
|
- name: Build and install
|
2020-05-12 20:51:04 +02:00
|
|
|
shell: cd /tmp/sispmctl*/ && ./configure --prefix=/usr && make install
|
|
|
|
when: sispmctl_file.stat.exists == false
|
2020-05-10 15:25:38 +02:00
|
|
|
- name: Install systemd service file
|
|
|
|
copy: src=sispmctl.service dest=/lib/systemd/system/
|
|
|
|
- name: Add script to autostart and start now
|
|
|
|
systemd: name=sispmctl state=started enabled=yes daemon_reload=yes
|
|
|
|
- name: Add to sysdweb
|
|
|
|
include_role:
|
|
|
|
name: pi-sysdweb
|
|
|
|
vars:
|
|
|
|
sysdweb_name: sispmctl
|