1.2 KiB
1.2 KiB
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 withssh-copy-id. - A
~/.ssh/configentry per host (User,IdentityFile,IdentitiesOnly yes). The inventory only lists host names, so these must match theHostlines 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
ansible-playbook playbooks/octoprint.yml --check --diff # dry run of the Pi's configuration
ansible-playbook playbooks/octoprint.yml # apply the Pi's configuration (after changes or a fresh flash)
Add -K if a play fails with "Missing sudo password".