No description, website, or topics provided.
Shell Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

ansible-pi: video-cluster

Quickly setup your Raspberry Pi to be part of a synchronized cluster of video players.

PI Setup

  1. Image your SD cards. script/image_card helps with this.
  2. Boot the new pis and go through initialization. Expand the filesystem, enable SSH, and optionally set the hostname to something unique.


Ensure ansible is installed (see Requirements, below).

Clone and setup the ansible script.

git clone
cd ansible-pi
git checkout video-cluster
cp hosts.example hosts

If you did not set the hostnames of the pis, you can use this script to find pis on the local network:


Put the pi hosts or IPs in hosts under "players".

Optionally, copy your ssh id to the players:

which ssh-copy-id || brew install ssh-copy-id
ssh-copy-id pi@XXX.XXX.X.XXX # password is 'raspberry'

To check that the players are properly configured:


Provision the players:


If you didn't copy your ssh id previously, you'll need to run the provision command directly with --ask-pass:

ansible-playbook provision.yml --ask-pass -i hosts

Provisioning will automatically deploy the application for you. However, once provisioning is done, you'll need copy your video file and any custom configuration to the pis:

script/copy <a video file> /home/pi/

or, if each pi gets a different video file:

scp <video file 1> pi@raspberrypi-1.local:~/
scp <video file 2> pi@raspberrypi-2.local:~/
# ...

Then, optionally, copy the configuration:

script/copy <path>/config.local.js /app/

See for more details on configuration.




Ansible is required.

pip install ansible

Useful Commands

Run adhoc commands:

script/run 'ls /'

Same, but with sudo privileges:

script/srun 'halt'

Manage the system service for the video player:

script/service restarted

Copy a local file to all players:

script/copy ../my-local-file.txt /app/

Check whether you can connect to all players: