Infrastructure/ansible
2026-09-27 22:13:35 +02:00
..
playbooks Adds ansible update and configuration file for octoprint raspberry 2026-09-27 22:13:35 +02:00
ansible.cfg Adds ansible update and configuration file for octoprint raspberry 2026-09-27 22:13:35 +02:00
inventory.yml Adds ansible update and configuration file for octoprint raspberry 2026-09-27 22:13:35 +02:00
README.md Adds ansible update and configuration file for octoprint raspberry 2026-09-27 22:13:35 +02:00

Ansible

Run from David's Linux PC over SSH — nothing is installed on the managed hosts. Run all commands from inside this ansible/ directory so ansible.cfg is picked up.

Prerequisites

  • sudo pacman -S ansible
  • One SSH key per client device (~/.ssh/id_ed25519_homelab), copied to each host with ssh-copy-id.
  • A ~/.ssh/config entry per host (User, IdentityFile, IdentitiesOnly yes). The inventory only lists host names, so these must match the Host lines exactly.

Hosts

Group Host Notes
octoprint octopi.home.staffenberger.at RPi4, IoT VLAN — the learning guinea pig

Usage

ansible octoprint -m ping                            # connectivity check
ansible-playbook playbooks/update.yml --list-hosts   # which hosts would this touch?
ansible-playbook playbooks/update.yml --check --diff # dry run
ansible-playbook playbooks/update.yml                # apt upgrade + reboot if required

Add -K if a play fails with "Missing sudo password".