ansible/roles/bluetooth-monitor/tasks/main.yml

22 lines
711 B
YAML

- name: Apt install bluez, firmware and Python requirements
apt:
name:
- bluez
- bluez-firmware
- firmware-realtek
- firmware-realtek-rtl8723cs-bt
- python3-pycryptodome
- python3-bleak
- python3-asyncio-mqtt
- python3-numpy
- name: Copy monitor script
template: src=my_btmonitor.py dest=/usr/bin/my_btmonitor owner=root mode=u+rwx
- name: Install systemd service file
copy: src=my_btmonitor.service dest=/etc/systemd/system/
- name: Add script to autostart and start now
systemd: name=my_btmonitor state=restarted enabled=yes daemon_reload=yes
#- name: Add to sysdweb
# include_role:
# name: pi-sysdweb
# vars:
# sysdweb_name: my_btmonitor