Skip to content

Consigliere

Declare & Chill

Consigliere is a GitOps Infrastructure as Code (IaC) framework for a small-to-medium fleet of hosts across a variety of operating systems, connected by a Tailscale network (a tailnet). The major focus is Linux, with less on macOS and Windows. BSD is not supported yet.

It sets itself apart with a deliberately primitive, statically timed, pull-based and serverless approach: there is no control server of its own, only your git host and Tailscale. Instead of a central system pushing configuration out, each host is responsible for pulling changes from your configuration repository and adopting them. The idea is closer to the periodic refresh of Group Policy than to a push-based pipeline, with a git repository where the domain controller would be.


Duplicate the consigliere-fleet-template (Use this template; set to private), then adjust it to define the properties and functionality of your machines. This private repo describes what your fleet should be: its single source of truth.

After the initial bootstrap, each host pulls that description on a timer (every 20 minutes by default), compares itself with it, and corrects the difference, with no central server pushing changes.

Made a bad change? There are several nets. When a repository has changed, a check pass runs first, and a failing check stops the run before anything is applied. Roles that use safe_apply (today otel_agent, forgejo_runner, notify_relay and zwave_js_ui; others are to follow) put the last good configuration back when a service does not come back healthy. With notifications set up, a failed run alerts you.

Status: in testing. Used on a real fleet, but the interfaces still move and several roles have not been run on every platform. This project comes with no warranty or guarantee of fitness for any purpose. Use it at your own risk.

LLM use. Built and maintained with AI assistance (Claude Code). Design decisions and reviews are by a human; generated code is reviewed before it is merged. See AGENTS.md.

flowchart TB
  accTitle: The six layers of Consigliere
  accDescr: Six layers from git at the top to applications at the bottom. Every layer talks over the Tailscale network, and Cmdr, Grafana and exposure watch check what is actually true.

  subgraph tailnet["Tailscale: every layer talks over the tailnet, SSH is closed to the world"]
    direction TB
    L1["<b>1 · Declare</b><br/>Git is the source of truth, nothing is applied by hand<br/>framework repo (public) · fleet repo (private) · sops + age secrets, one key per host"]:::blue
    L2["<b>2 · Reconcile</b><br/>every host pulls and applies its own config on a timer<br/>sync both repos → check (changes nothing) → apply (skipped when nothing is new)"]:::green
    L3["<b>3 · Configure</b><br/>tags in the host table pick the roles<br/>host table → tag manifests → idempotent Ansible roles"]:::purple
    L4["<b>4 · Host</b><br/>baseline: users, SSH, sysctl, updates · firewall: ufw, tailnet-first<br/>Docker engine · Tailscale · sops · timers"]:::amber
    L5["<b>5 · Platform services</b><br/>Edge: Traefik, Cert Warden<br/>Observe: otel, Loki, Victoria, Grafana<br/>Protect: Arkeep, restic, Wazuh<br/>Console: Cmdr, Muximux, Homarr<br/>Data: Garage S3, data disks<br/>Notify: Apprise, run reports"]:::teal
    L6["<b>6 · Applications</b><br/>Compose stacks, owned by Arcane and not by Ansible<br/>your apps on any host · scheduled apt and Compose updates"]:::red
    L1 --> L2 --> L3 --> L4 --> L5 --> L6
  end

  drift["<b>Drift check</b><br/>Cmdr · Grafana · exposure watch"]:::green
  tailnet -. checked against what is actually true .- drift

  classDef blue fill:#2f6fdb26,stroke:#2f6fdb
  classDef green fill:#1f8a4c26,stroke:#1f8a4c
  classDef purple fill:#7a45c926,stroke:#7a45c9
  classDef amber fill:#c2741026,stroke:#c27410
  classDef teal fill:#16808f26,stroke:#16808f
  classDef red fill:#c8374f26,stroke:#c8374f
  style tailnet fill:transparent,stroke:#16808f,stroke-dasharray:5 4

A host’s table entry lists tags such as util: [traefik] or feat: [otel]. Each tag has a manifest that names the Ansible roles to run. The host reconciles itself every 20 minutes: it pulls the framework repo and your private fleet repo, runs a check pass when something changed, applies, and skips the run when nothing is new. Drift is corrected without anyone running a playbook.

Reach for it when you run a handful to a few dozen hosts you care about (a homelab, a few VPSs, a Proxmox node, an Unraid box, or even end-user machines), you want the whole setup reviewable (and editable) in git, and you do not want to run a central controller or keep a push-based pipeline healthy.

Look elsewhere when you need dynamic autoscaling, thousands of nodes, or a hosted control plane with a vendor behind it.

  1. Create your private fleet repo from consigliere-fleet-template (“Use this template”, private).
  2. Describe a host in config/inventory/hosts.yml, keyed by its Tailscale hostname.
  3. On the new host, as root, run hosts/bootstrap/bootstrap.sh. It installs git and Ansible, clones this repo, grants the host a read-only deploy key for your fleet repo, runs one reconcile, and installs the timer.
  4. Give the host its secrets from your admin machine: scripts/access.sh add-host <name> <age key>, then sync, then push.

The host generates its own age key; nothing secret is copied to it. Tailscale auth keys are never stored: bootstrap.sh prompts for one.

What Consigliere manages, and what it does not

Section titled “What Consigliere manages, and what it does not”

Configuration changes to the components listed in this table should be edited in your private fleet repo. They will be applied at next reconcile.

Area What Where it is declared
Host OS Packages, users, SSH hardening, sysctl, unattended upgrades, hostname, time zone, journald and reconcile limits baseline role, vars/
Network Tailscale install and enrollment, the ufw firewall (tailnet open, the world only where a tag asks), DNS resolver tailscale, firewall, dns_resolver
Container engine Docker install, the guard that controls published ports, Arcane’s own containers docker, arcane_*
Edge Traefik routes (one file per domain, each route naming the host that serves it), headers and certificates, issued once by Cert Warden and fetched as files traefik_server, certwarden_*, config/routes/<domain>.yml
Observability The OpenTelemetry agent on each host, Loki, VictoriaMetrics, Grafana’s provisioned data sources and dashboards, exposure scans otel_agent, loki_server, victoria_server, grafana_server, exposure_watch
Backups The Arkeep server and agents, the restic REST target and mirror arkeep_*, restic_*
Security The Wazuh agents and the manager’s kernel setting wazuh_*
Consoles Cmdr (the fleet console), Muximux tiles, Homarr and its sign-in gate cmdr, muximux, homarr
Shared services Garage S3, notifications (Apprise, or a relay to Home Assistant Supernotify) and run reports, scheduled apt and Compose updates, Forgejo runner garage, apprise, apt_updates, compose_updates, forgejo_runner
Secrets access Who can decrypt which secret, derived from tags config/secrets/, scripts/access.sh in the fleet repo
Platforms What kind of machine each host is (Debian, Ubuntu, Alpine, Unraid), so a role runs only where it can: capabilities, releases, tool versions, and portable package, repository, service, schedule, boot and download tasks hosts/platforms/, the platform role, os: and arch: in the host table
Windows hosts (experimental) Clock, Windows Update policy, Defender, firewall, Remote Desktop, OpenSSH and Tailscale, from a pull-only PowerShell reconciler windows/, windows_* variables

These, and just about everything else running on your host, is managed independently.

Thing Owner Consigliere’s part
Application stacks (stacks/) Arcane, which syncs them from git and owns drift and redeploys Installs Arcane, never touches the running containers
Edits made in an app’s own UI: Grafana dashboards saved in the UI, Muximux tiles you add, Homarr boards You, in that app Only what is declared is restored; everything else is yours
Who may sign in, groups, passkeys, OIDC clients Your identity provider (for example Pocket ID) Reads the OIDC client ID and secret from a sops secret
DNS records, registrar settings Your DNS provider Documents the names; the one automated part is the ACME challenge record
Tailscale ACLs, tailnet settings, key expiry The Tailscale admin console Enrolls the host; never edits the policy
Cloud provider firewalls and security lists (for example Oracle’s) The provider Leaves them alone
Creating hosts: VMs, VPSs, bare metal, hypervisor guests You (provisioning is not built) Takes a host that already exists and makes it converge
Proxmox, Unraid and the hardware under them The platform itself Container-based roles run on Unraid and Alpine hosts; Proxmox has its own guide
Data inside services: backups’ contents, databases, object storage buckets’ contents The service and you Runs the service and declares buckets and keys, not the data
Hand-registered credentials: the Forgejo runner registration, Garage’s capacity layout You, once Keeps the result in place afterwards

The full table, with the mechanism and rollback for each row, is docs/ownership.md.

Layer Where Does
1. Declare This repo (public, generic) and your private fleet repo Roles, scripts and the console live here; your host table, variables and sops-encrypted secrets live there
2. Reconcile hosts/bootstrap/reconcile.sh, on a timer on every host (a systemd timer, or a container loop on Unraid and Alpine; macOS and Windows have their own reconcilers) Syncs both repos, assembles a run directory, checks, applies
3. Configure hosts/tags/, your config/tags/, hosts/roles/ A host’s tags choose roles, in manifest order
4. Host baseline, tailscale, firewall, docker The same ground floor on every host
5. Platform The role library Edge, observability, backups, security, consoles
6. Applications stacks/ and Arcane Your containers

Two rules keep this readable. The host table (config/inventory/hosts.yml in your fleet repo) is the one place that says what a machine is, keyed by its Tailscale name. Settings live in one YAML file per scope: config/vars/group/<group>.yml, config/vars/host/<host>.yml and config/vars/routes/<host>.yml, which the reconciler gives each host as a merged host_vars/<host>/ directory.

Each run is a short sequence, and every step is skippable on purpose:

  1. Sync the framework and fleet repos.
  2. Skip the whole run if neither repo changed since the last successful apply and a full run is not yet due (every 6 hours by default). scripts/reconcile-now.sh forces a run.
  3. Check (--check --diff) when a repo changed. A failing check stops the run before anything is applied. RECONCILE_PRECHECK=1 checks always, 0 never.
  4. Apply, and record the commits that were applied.

Reconcile runs at low CPU and disk priority and caps the journal, so it does not compete with what the host is really for. RECONCILE_PROFILE=1 prints per-task timings. The variables are in the command-line reference.

Nothing sensitive is committed to this repo, ever. Secrets live in your fleet repo under config/secrets/<kind>/<name>.yml, encrypted with sops to the age public keys of the hosts allowed to read them. A host decrypts only what it is a recipient of, with a private key that never leaves it. Who can read what follows from each host’s tags: add util: [arkeep] to a host, run scripts/access.sh sync, and it can read the Arkeep secrets. The load_secrets role is the only code that reads them. See docs/security.md.

Roles by area (each links to its README where it has one)
Area Roles
Ground floor baseline, tailscale, sops, docker, firewall, timezone, dns_resolver, nic_offload, data_disk
Edge and certificates traefik_server, certwarden_server, certwarden_agent
Observability otel_agent, loki_server, victoria_server, grafana_server, exposure_watch, beszel_hub, beszel_agent
Backups arkeep_server, arkeep_agent, restic_server, restic_mirror, pbs_server
Security wazuh_agent, wazuh_server
Consoles cmdr, muximux, homarr
Shared services garage, apprise, apprise_server, notify_relay, notify_client, apt_updates, compose_updates, semaphore_server, forgejo_runner, zwave_js_ui
Containers arcane_server, arcane_agent
Internals platform (decides what kind of machine a host is), fleet_plan (reads tag manifests), load_secrets, safe_apply (validate, keep a copy, apply, health-check, restore)
Read For
docs/architecture.md How the pieces fit and why
docs/ownership.md What is managed, how, and how to roll it back
docs/cli-reference.md bootstrap.sh, reconcile.sh and their variables
docs/platforms.md Debian, Ubuntu, Alpine, ARM64, Unraid, macOS, Windows, and the platform layer that lets one role run on several
docs/windows-host.md, docs/proxmox-host.md, docs/coordination-server.md Specific host kinds
docs/sigcli.md The design of sigcli, the admin command line (cli/)
docs/security.md Trust boundaries and secrets
docs/decisions.md, docs/STATE.md, CHANGELOG.md Why it is this way, what is true now, what changed
docs/credits.md Every component adopted, its licence, and what was passed over
VISION.md Where it is going and what it will not do

Pushes to main are what hosts apply, so the lint gate (ansible-lint and yamllint in .github/workflows/lint.yml) is the change-approval step: review pull requests like deployments. The project follows the conformIT engineering standard; conventions for people and agents are in AGENTS.md.

Consigliere is mostly glue around other people’s software, and none of it would work without them. Core is what the framework itself is built from. Extensions are complementary: a host gets one only when its tags ask for it, and a fleet can run with none of them. Licences, and what was passed over, are in docs/credits.md.

Role it plays Technology
Source of truth and delivery Git; GitHub for hosting, read-only deploy keys and CI
Configuration engine Ansible, with the community.general, community.docker and ansible.posix collections
Network between hosts Tailscale
Secrets sops (encryption) with age (per-host keys)
Scheduling the reconcile systemd timers on Debian and Ubuntu; a container loop on Unraid and Alpine; launchd on macOS; Task Scheduler on Windows
Container engine Docker Engine and Compose
Host access and protection (Linux) OpenSSH, ufw, nftables (the guard on Docker’s published ports), unattended-upgrades
Languages and data YAML, Python, Bash; PowerShell 7 on Windows

Platforms it runs on: Debian, Ubuntu, Alpine Linux (with OpenRC), Unraid, macOS and Windows 11 (experimental). How far each one is supported is in docs/platforms.md.

Area Technology What it adds
Edge and certificates Traefik Edge proxy
Cert Warden Issues certificates once and hands them to the hosts that need them
Observability OpenTelemetry Collector Ships logs and metrics from each host
Loki, VictoriaMetrics Store the logs and the metrics
Grafana Dashboards
Beszel Lightweight host monitoring
Backups Arkeep Backup server and agents
restic, rest-server Repository format, backup target and mirror
Proxmox Backup Server (community image) Backups of Proxmox guests
Security Wazuh Security monitoring
Nmap, Shodan Exposure watch: what the internet can reach, checked against what is declared
docker-socket-proxy Limits what a container may ask the Docker socket
Containers Arcane Syncs application stacks from git and manages containers
Consoles Cmdr (part of this repo, served by nginx) Fleet console, with map outlines from Natural Earth
Muximux, Homarr Dashboards of links to your services
Notifications Apprise (API server) One call, many delivery services
Storage Garage (web UI) S3-compatible object store
Automation Forgejo runner CI jobs for Forgejo
Semaphore UI Run Ansible from a web page
Home automation Z-Wave JS UI Z-Wave controller

These are not deployed by this repo. The framework can talk to them: Home Assistant with Supernotify for alerts, and Pocket ID for sign-in.

ansible-lint, yamllint and ShellCheck keep the code honest, conformIT is the engineering standard, and Claude Code assists with the work.

MIT (about the licence).