added beacon and udev for rfxcom
This commit is contained in:
parent
4b9e15a9e5
commit
643e1ccc64
13
k3s/files/etc/salt/minion.d/beacons.conf
Normal file
13
k3s/files/etc/salt/minion.d/beacons.conf
Normal file
@ -0,0 +1,13 @@
|
||||
beacons:
|
||||
inotify:
|
||||
- files:
|
||||
/dev:
|
||||
mask:
|
||||
- create
|
||||
- delete
|
||||
exclude:
|
||||
- /dev/gpiochip3
|
||||
- /dev/serial
|
||||
- /dev/ttyUSB0
|
||||
- /dev/ttyUSB1
|
||||
- disable_during_state_run: True
|
5
k3s/files/etc/udev/rules.d/90-RFXtrx433.rules
Normal file
5
k3s/files/etc/udev/rules.d/90-RFXtrx433.rules
Normal file
@ -0,0 +1,5 @@
|
||||
SUBSYSTEM=="tty", \
|
||||
ACTION=="add", \
|
||||
DRIVERS=="ftdi_sio", \
|
||||
ATTRS{interface}=="RFXtrx433", \
|
||||
SYMLINK+="rfxtrx433"
|
@ -1,3 +1,4 @@
|
||||
include:
|
||||
- k3s.firewalld
|
||||
- k3s.network
|
||||
- k3s.usb-devices
|
||||
|
30
k3s/usb-devices.sls
Normal file
30
k3s/usb-devices.sls
Normal file
@ -0,0 +1,30 @@
|
||||
Install PyInotify:
|
||||
pkg.installed:
|
||||
- name: python3-pyinotify
|
||||
|
||||
Add the rfxcom433 beacon file:
|
||||
file.managed:
|
||||
- name: /etc/salt/minion.d/beacons.conf
|
||||
- source: salt://k3s/files/etc/salt/minion.d/beacons.conf
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: "0644"
|
||||
|
||||
Restart salt-minion:
|
||||
service.running:
|
||||
- name: salt-minion
|
||||
- onchanges:
|
||||
- file: Add the rfxcom433 beacon file
|
||||
|
||||
Add the rfxcom udev rule:
|
||||
file.managed:
|
||||
- name: /etc/udev/rules.d/90-RFXtrx433.rules
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: "0644"
|
||||
|
||||
reload udev rules:
|
||||
cmd.run:
|
||||
- name: udevadm control --reload
|
||||
- onchanges:
|
||||
- file: Add the rfxcom udev rule
|
Reference in New Issue
Block a user