Working sound setup for raspis
This commit is contained in:
20
roles/pi-dhtsensor-circuitpython/tasks/main.yml
Normal file
20
roles/pi-dhtsensor-circuitpython/tasks/main.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
- name: apt install libgpiod2
|
||||
apt: name=libgpiod2 cache_valid_time=7200 state=present
|
||||
- name: pip install adafruit-circuitpython-dht
|
||||
pip:
|
||||
name: adafruit-circuitpython-dht
|
||||
executable: pip3
|
||||
- name: Install script config
|
||||
template: src=dht22_sensing.json dest=/etc/dht22_sensing.json
|
||||
- name: Install script
|
||||
copy: src=dht22_sensing.py dest=/usr/bin/dht22_sensing owner=root mode=u+rwx
|
||||
- name: Install systemd service file
|
||||
copy: src=dht22_sensing.service dest=/lib/systemd/system/
|
||||
- name: Add script to autostart and start now
|
||||
systemd: name=dht22_sensing state=started enabled=yes daemon_reload=yes
|
||||
- name: Add to sysdweb
|
||||
include_role:
|
||||
name: pi-sysdweb
|
||||
vars:
|
||||
sysdweb_name: dht22_sensing
|
||||
Reference in New Issue
Block a user