mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 23:49:56 +00:00
5.2 KiB
5.2 KiB
AGENTS.md
Ansible-driven personal infrastructure repo for Void desktops, Linux workstations, Windows+WSL, and an Ubuntu server.
Source Of Truth
- Main orchestration:
ansible/site.yml - Inventory and layering inputs:
ansible/inventory/hosts.yml,ansible/inventory/group_vars/*.yml,ansible/inventory/host_vars/*.yml - Dotfiles live under
dotfiles/ - OpenCode loads global instructions from
dotfiles/desktop/.config/opencode/opencode.json
Topology
- Void desktops:
ikaros,nymph - Native Linux workstations:
deadalus-ubuntu,deadalus-fedora - Windows host + WSL dev:
deadalus-win,deadalus-wsl - Ubuntu server:
prometheus - Hosts intentionally belong to multiple groups; trust
ansible/site.ymlover hostname assumptions.
Working Rules
- Preserve layering
all -> OS -> profile -> host. - Keep
ansible/site.ymlsmall; orchestration belongs there, implementation belongs in roles. - Prefer minimal, targeted edits. Preserve idempotency and existing ordering.
- Most hosts use
ansible_connection: local; Windows host is the exception. - Treat
secrets/as sensitive. Never print secret values. - Tmux plugins are bootstrapped by TPM on the host; the repo only keeps tmux config and custom helper scripts.
- Read the relevant role tasks, templates, vars, and deployed dotfiles before editing.
Validation
- Default minimum:
ansible-playbook ansible/site.yml --syntax-check
- Repo-wide checks:
ansible-lint ansible/site.ymlansible-lint ansible/rolesyamllint ansible/
- Host-focused dry runs:
- Void desktop work:
ansible-playbook ansible/site.yml --limit ikaros --check --diffor--limit nymph --check --diff - Ubuntu workstation:
ansible-playbook ansible/site.yml --limit deadalus-ubuntu --check --diff - Fedora workstation:
ansible-playbook ansible/site.yml --limit deadalus-fedora --check --diff - WSL dev:
ansible-playbook ansible/site.yml --limit deadalus-wsl --check --diff - Server:
ansible-playbook ansible/site.yml --limit prometheus --check --diff
- Void desktop work:
- Focused checks:
- Emacs dotfiles only:
ansible-playbook ansible/site.yml --limit ikaros --tags emacs --check --diffor--limit nymph --tags emacs --check --diff- Mail bootstrap:
sh -n scripts/bootstrap_mail.shandshellcheck scripts/bootstrap_mail.sh - Windows bootstrap parse:
pwsh -NoProfile -Command "[void][System.Management.Automation.Language.Parser]::ParseFile('scripts/bootstrap_windows_workstation.ps1', [ref]$null, [ref]$null)" - Server compose render:
docker compose -f /opt/docker/server/docker-compose.yml config
- Mail bootstrap:
Conventions
- Use FQCN Ansible modules.
- Prefer declarative modules over
command/shell; whenshellis required, make idempotency and failure behavior explicit. - Start YAML files with
---, use 2-space indentation, and keep file modes quoted like"0644". - Keep booleans as booleans and structured vars as YAML lists/maps.
- Put host-specific overrides in
host_vars, not sharedgroup_vars. - Use
no_log: truefor secret-bearing task inputs or outputs.
Desktop Void Notes
profile_desktop_commonowns the shared desktop bootstrap..emacs.dis deployed by a dedicatedprofile_desktop_commontask taggedemacs.- User services are managed by
turnstileand live underdotfiles/desktop/.config/service/. desktop_ollama_enabledcontrols whether the userollamaservice is present; default isfalseand hosts can override it inhost_vars.ssh-agentruns underturnstilewith stable socket~/.local/state/ssh-agent/socket.- Critical session entrypoints:
dotfiles/desktop/.xinitrcdotfiles/desktop/.local/bin/start-sway-session
- Do not auto-restart
empttyduring playbook runs on active desktop hosts; restart it manually from another TTY/SSH session if needed.
Workstation / Windows Notes
- Native Linux workstation hosts can combine
workstation_host_linuxwith an OS-specific dev group. deadalus-fedorakeeps GNOME managed settings inansible/inventory/host_vars/deadalus-fedora.yml.- Ubuntu workstation follow-up work is still open around YubiKey/GPG/SSH-FIDO2 package verification, GPG signing setup on the YubiKey, and evaluating
ed25519-skSSH key generation. workstation_host_windowsruns withgather_facts: falseand validates PSRP settings pluswindows_package_backendbefore role execution.- Windows taskbar pins are driven by
windows_taskbar_pinsinansible/inventory/group_vars/workstation_host_windows.yml; validate identifiers from a real Windows session before changing them.
Tooling Notes
- Install local tooling with:
python3 -m pip install ansible ansible-lint yamllint shellcheck-pyansible-galaxy collection install -r ansible/collections/requirements.yml
- Required collections currently include
ansible.posix,ansible.windows,community.general, andcommunity.windows. .yamllinttreatsline-lengthas a warning at 120 chars and disablesdocument-startandcomments-indentation.
When Updating Docs
- Keep
README.mdandAGENTS.mdaligned when workflows materially change. - If you add a new operational area, also add the narrowest validation command for it.
- Call out checks you could not run and any follow-up verification needed.