Update dht22 sensing code + sispmctl fixes

This commit is contained in:
Martin Bauer
2020-05-12 20:51:04 +02:00
parent d8c9a491d1
commit 93034dd0ec
5 changed files with 88 additions and 10 deletions

View File

@@ -1,15 +1,15 @@
---
- name: Check if sispmctl already exists
stat: path=/usr/local/bin/sispmctl
register: sispmctl_file
- name: Install dependencies
apt: name=libusb-dev cache_valid_time=7200 state=present
apt: name="libusb-dev" cache_valid_time=7200 state=present
- name: Copy sispmctl sources
unarchive:
src: sispmctl-4.7.tar.gz
dest: /tmp
creates: /usr/local/bin/sispmctl
unarchive: src=sispmctl-4.7.tar.gz dest=/tmp
when: sispmctl_file.stat.exists == false
- name: Build and install
command: cd /tmp/sispmctl*/ && ./configure && make install
creates: /usr/local/bin/sispmctl
shell: cd /tmp/sispmctl*/ && ./configure --prefix=/usr && make install
when: sispmctl_file.stat.exists == false
- name: Install systemd service file
copy: src=sispmctl.service dest=/lib/systemd/system/
- name: Add script to autostart and start now