updates raspis to new os based on bookworm

This commit is contained in:
Martin Bauer
2024-02-19 08:10:58 +01:00
parent 7776095180
commit 7501ef18a4
25 changed files with 359 additions and 74 deletions

View File

@@ -1,10 +1,10 @@
[Unit]
Description=DHT22 Temperature Humidity Sensing
After=multi-user.target
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/python3 /usr/bin/dht22_sensing
ExecStart=/usr/bin/dht22_sensing
[Install]
WantedBy=multi-user.target

View File

@@ -10,16 +10,18 @@
name: adafruit-circuitpython-dht
executable: pip3
state: absent
extra_args: "--break-system-packages"
- name: pip install adafruit-dht
pip:
name: adafruit-dht
executable: pip3
extra_args: "--break-system-packages"
- 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/
copy: src=dht22_sensing.service dest=/etc/systemd/system/
- name: Add script to autostart and start now
systemd: name=dht22_sensing state=restarted enabled=yes daemon_reload=yes
- name: Add to sysdweb