title, created, updated, type, tags, sources
title
created
updated
type
tags
sources
GitOps
2026-04-28
2026-04-28
concept
../automation/scripts.md
../../homelab/architecture.md
GitOps
The homelab uses a GitOps pattern where the git repository IS the infrastructure.
Core Principle
All configuration lives in /home/bear/homelabagentroot/. Each host pulls its configs from the repo. Agents (Hermes, OpenCode) commit changes and push to Gitea. Other hosts pull on next session.
Repository Structure
Git Triggers
Action
What Happens
Agent commits & pushes
Configs pushed to Gitea
Other host pulls
Gets latest configs
Drift detected
detect-drift.py or drift_detector.py flags differences
Manual deploy
ansible-playbook deploy-services.yml --limit <host>
Agents Using GitOps
Agent
Host
Role
Hermes
ice, grizzley
Commit infra changes, push to Gitea
OpenCode
ubuntu, ice
Read/write configs, run Ansible
Gitea
ubuntu
GitOps hub — all repos live here
Key Files
scripts/homelab/deploy-service.py — Deploy services to remote hosts
scripts/homelab/detect-drift.py — Detect config drift between repo and hosts
ansible/playbooks/deploy-services.yml — Restart Docker services
ansible/playbooks/sync-configs.yml — Pull/push docker-compose configs
Related
gitea — Git host and GitOps runner hub
ubuntu — Primary Docker host where most configs deploy
ice — Control plane, primary Hermes Agent host
deployment-scripts — Full automation scripts inventory