- Jinja 49.6%
- Lua 27%
- JavaScript 17.2%
- Shell 5.4%
- Dockerfile 0.8%
| adr | ||
| group_vars | ||
| host_vars | ||
| playbooks | ||
| roles | ||
| .dprint.json | ||
| .gitignore | ||
| AGENTS.md | ||
| ansible.cfg | ||
| inventory.ini | ||
| README.md | ||
| requirements.yaml | ||
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 thecommon_*process playbooks;inventory.ini— the hosts and theiransible_hostaddresses;group_vars/all.yaml— the group-wide variables, including the encryptedssh_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