grahamoregan / ansible-pibeacon

Ansible playbook to configure a Raspberry Pi as an Apple iBeacon device

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PiBeacon-Ansible

I needed to set up an iBeacon for a project I'm working on so I followed the Radius Networks guide to setting up a Raspberry Pi with a Bluetooth LE USB dongle. I've wrapped the process in an Ansible playbook because I may need to create a few more beacons and I didn't want to have to repeat this process on each one.

To run the playbook you'll need to follow a few steps

  • Make sure you are running SSHD on the Raspberry Pi - this is included in the graphical installer
  • Add your SSH key to the pi user's ~/.ssh/authorized_keys2 file
$ cat .ssh/id_rsa.pub | ssh pi@<your raspberry pi> "cat >> ~/.ssh/authorized_keys"
  • Then run the playbook against the selected inventory
$ ansible-playbook -i inventory/dev 

It takes quite a long time for the process to complete but once it does you should be able to stop and start the beacon using;

# /etc/init.d/ibeacon stop/start

About

Ansible playbook to configure a Raspberry Pi as an Apple iBeacon device


Languages

Language:Shell 100.0%