mKeRix/ansible-playbooks

Bluetooth permissions seem to be missing

georgeinva2004 opened this issue · 2 comments

I'm running five Pi Zeroes. The first I installed by hand using the instructions provided, the remaining four I used the ansible-playbook. Worked great!!!!! After a few days I noticed I wasn't seeing any bluetooth detections from the nodes installed by Ansible. After a bunch of digging, I tried manually executing the bluetooth permission commands noted in the Pi Zero install instructions:

sudo setcap cap_net_raw+eip $(eval readlink -f which node)
sudo setcap cap_net_raw+eip $(eval readlink -f which hcitool)
sudo setcap cap_net_admin+eip $(eval readlink -f which hciconfig)

Voila! Detections started showing up in the logs.

Thanks for opening an issue for this - it was already reported by someone else in another thread and I forgot to make one myself. Strangely, I just recently installed a new Pi Zero into my cluster with Ansible and did not face these problems. The playbook contains the definitions for setting the permissions, but for some reason they don't seem to be executed reliably.

Not reliably seems to be right, I am just new to this and tried to deploy two rpi4's with it.
On one it started right away, on the other I had to input the setcap commands.
I am relatively shure I haven't done this manually on the other host (relatively because when testing things out sometimes I forget a specific step, so "shurenesslevel" here is about 93 % ;-) )

Just deployed with the same playbook (I added a new host description, don't know how to express that correctly, new to ansible...) a pi zero. On that it worked right away and I hadn't to do setcap manually. If that helps.