Ansible playbooks and few other things
  • Jinja 49.6%
  • Lua 27%
  • JavaScript 17.2%
  • Shell 5.4%
  • Dockerfile 0.8%
Find a file
2026-11-29 16:08:42 +00:00
adr feat: add README, AGENTS.md and the architecture decision records 2026-10-18 12:34:11 +00:00
group_vars fix: serialise the restic runs and drop the tube host 2026-11-28 10:03:44 +00:00
host_vars feat: add the frps and frpc roles and the relay host 2026-11-29 16:06:18 +00:00
playbooks feat: add the frps and frpc roles and the relay host 2026-11-29 16:06:18 +00:00
roles fix: pull the mihomo subscription directly 2026-11-29 16:08:42 +00:00
.dprint.json feat: add chat host, streamable HTTP MCP, and opencode v2 2026-10-13 20:47:23 +00:00
.gitignore feat: basics 2026-07-11 16:58:09 +00:00
AGENTS.md feat: add README, AGENTS.md and the architecture decision records 2026-10-18 12:34:11 +00:00
ansible.cfg feat: vault-managed SSH, /opt stack layout, sshfs + restic backups 2026-10-18 12:10:26 +00:00
inventory.ini feat: add the frps and frpc roles and the relay host 2026-11-29 16:06:18 +00:00
README.md feat: add README, AGENTS.md and the architecture decision records 2026-10-18 12:34:11 +00:00
requirements.yaml feat: vault-managed SSH, /opt stack layout, sshfs + restic backups 2026-10-18 12:10:26 +00:00

Infra

A declarative Ansible configuration for the home lab: one repository that installs the software on every host and keeps the hosts converged.

Status: the hosts, their software, the shared storage and the backups are managed from this repository. The decisions live in adr/.

What It Is

The repository describes every host as a set of roles. A role installs one piece of software; a playbook binds the roles to a host or runs a process; a host is named after the task it performs; and the shared storage and the backups follow the pool approach.

Ansible converges a host to the described state, so a run is idempotent and a host is rebuilt by running its playbook.

Layout

  • adr/ — architecture decision records, the source of truth for the design;
  • roles/ — one role per piece of software, plus the supporting roles (ssh, sshfs, restic, docker, bash, profile, ...);
  • playbooks/ — a playbook per host, plus the common_* process playbooks;
  • inventory.ini — the hosts and their ansible_host addresses;
  • group_vars/all.yaml — the group-wide variables, including the encrypted ssh_keys;
  • host_vars/<host>.yaml — the per-host variables: the roles' inputs, the authorized keys and the restic repository;
  • requirements.yaml — the Ansible collections;
  • ansible.cfg — the inventory, the roles path and the host key checking.

Usage

ansible-galaxy collection install -r requirements.yaml
ansible-playbook playbooks/note.yaml

A host playbook is run by the host's name; a common_* process playbook requires the target_host variable:

ansible-playbook playbooks/common_mihomo.yaml --extra-vars target_host=ai