1
0
Fork
You've already forked rpi-ansible
0
A collection of Ansible playbooks I use to automate configuration of the various Raspberry Pis I have running at home.
  • Jinja 100%
2025年10月19日 19:36:35 +11:00
inventory Added new indoor-aq-status and office-aq-status clients to pi-home-dashboard configuration. 2025年03月10日 20:42:40 +11:00
playbooks Added prometheus-node-exporter for metrics scraping. 2025年10月17日 19:00:42 +11:00
roles Changed prometheus-node-exporter configuration to be a systemd unit override. 2025年10月19日 19:36:35 +11:00
.gitignore Added .idea to .gitignore. 2025年10月11日 10:16:57 +11:00
.gitmodules Moved configuration symlinking to config-ansible Git submodule. 2023年06月26日 21:34:53 +10:00
.python-version Updated README with instructions on how to use pyenv and venv to have a self-contained Ansible installation. 2024年04月02日 13:04:04 +11:00
.vault_pass Added server playbook. 2023年08月12日 11:59:27 +10:00
ansible.cfg Added playbook for e-ink dashboard, role for e-ink dashboard and Docker installation, and set up configuraiton of configuration repository and installation. Added VNC password as an encrypted Ansible Vault secret. 2023年06月16日 22:58:51 +10:00
LICENSE Initial commit of Raspberry Pi Zero W playbooks. 2023年06月14日 11:47:24 +10:00
README.md Updated GitHub repositories to point to Codeberg instead. 2025年08月12日 18:23:53 +10:00
requirements.txt Updated README with instructions on how to use pyenv and venv to have a self-contained Ansible installation. 2024年04月02日 13:04:04 +11:00

rpi-ansible

Overview

This repository contains the Ansible playbooks I use to automate configuration of the various Raspberry Pis I have running at home.

  • playbooks/dashboard.yml configures Raspberry Pi Zero Ws/Zero 2 Ws with attached Pimoroni HyperPixel 4 TFT displays that display the temperature/power usage dashboard and a clock from my pi-home-dashboard repository.
  • playbooks/e_ink_dashboards.yml configures the Raspberry Pi 3B+ with attached 2.7" Pi Supply e-ink display that displays the temperature and humidity from my pi-home-dashboard repository.
  • playbooks/server.yml configures the Raspberry Pi 4B+ that runs everything else.

Optional: Adding a self-contained Ansible installation

  • Install and configure pyenv
  • Install the version of Python for this project — pyenv install
  • Add a new virtualenv for this project — python3 -m venv .venv
  • Activate the virtualenv — . .venv/bin/activate
  • Install Ansible — pip3 install -r requirements.txt

Before running any ansible-playbook commands, load the virtualenv with . .venv/bin/activate.

Running

Run as ansible-playbook playbooks/<playbook>.yml.

To specify a single host, add -l <host>.

To run only a specific subset of a playbook, use one of the tags described below with the -t flag.

Tags

To make it easier to run individual tasks that might need occasionally updating separately from running every task in an entire playbook, the following tags are available:

server.yml, dashboards.yml, e_ink_dashboards.yml

  • install-packages — Updates to packages installed with apt install can be applied to all the runbooks with this tag.

server.yml

  • chrony
  • nodejs
  • mosquitto
  • pi-home-dashboard
  • pvoutput-uploader
  • shairport-sync — Builds installs both shairport-sync as well as the required nqptp dependency
  • update-shairport-sync — Stops the shairport-sync systemd service, uninstalls shairport-sync and removes the repository, and clones, builds, and installs it afresh.

dashboards.yml

  • browser — Configures the web browsers and the URL they'll launch to on boot.
  • hyperpixel-brightness-control — Pulls updates from the hyperpixel-brightness-control repository and updates configuration settings.
  • refresh-dashboard — This won't run without explicitly setting the --tags refresh-dashboard flag and will do a full browser refresh, useful for picking up changes in the Pi Home Dashboard pages.

update_config_repository_and_bashmarks.yml

  • update-config — Pulls the latest commits from the configuration repository and doesn't do anything else
  • update-bashmarks — Updates the bashmarks configuration on all hosts