Commit b6767b9a authored by Levin Zimmermann's avatar Levin Zimmermann

playbook: Fix missing permission for slapuser

In the Wendelin learning track this permission is granted to the user via
"chgrp SLAPUSER /dev/i2c-3". Because we don't know the particular
slapuser we have to add the permission to all users of the slapsoft
group. Because /sys/bus/i2c/devices/i2c-3 is a virtual directory and
we want to make sure that even after rebooting or unplugging /
replugging of the sensor the permission is still granted udev rules
have been added.
parent 2a500621
SUBSYSTEM=="i2c-dev", KERNEL=="i2c-3", ACTION=="add", PROGRAM="/bin/sh -c 'chown root:slapsoft /sys/bus/i2c/devices/i2c-3 ; chmod 640 /sys/bus/i2c/devices/i2c-3"
...@@ -26,3 +26,9 @@ ...@@ -26,3 +26,9 @@
template: template:
src: read_bme280.j2 src: read_bme280.j2
dest: /usr/local/bin/read_bme280.py dest: /usr/local/bin/read_bme280.py
- name: Add access sensor permission for slapsoft
copy:
src: 60-i2c-tools.rules
dest: /etc/udev/rules.d/60-i2c-tools.rules
owner: root
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment