Examples
Each example includes an inventory.kdl, plan.kdl, a README.md, and any supporting files. Find them in the examples/ directory of the repository.
hello-echo
Section titled “hello-echo”A minimal example that deploys an HTTP echo server. Great starting point.
Modules used: shell, container
web-server
Section titled “web-server”Install nginx, deploy a templated configuration file, enable the service, restart it only when the configuration changed, and run a health check. Every step is tagged, so --tags config pushes only a configuration change.
Modules used: package, file (template), systemd, shell
user-setup
Section titled “user-setup”Create deploy users with specific shells, groups, and SSH authorized keys.
Modules used: user, file, shell
container-app
Section titled “container-app”Deploy a containerized application with port mappings, environment variables, and persistent volumes. The image tag is a prompted variable: asked when the run starts, or given with --var app-tag=….
Modules used: container
gpu-inference
Section titled “gpu-inference”Deploy a GPU inference server: a one-shot weight download, host IPC namespace and GPU flags, a readiness gate that blocks until the API is serving, and an until= gate that holds the run until the model is listed.
Modules used: container, subscribe, until
disk-management
Section titled “disk-management”Discover available disks dynamically, then format and mount each one using register and loop.
Modules used: disk, shell, register, loop
multi-tier
Section titled “multi-tier”A multi-group setup with web, app, and database tiers. Uses plan includes for shared configuration.
Modules used: include, package, file, systemd, container, shell
nix-deploy
Section titled “nix-deploy”Install packages via Nix on any distribution, run commands in ephemeral Nix shells, manage channels, and garbage collect the store.
Modules used: nix
external-module
Section titled “external-module”Use an external plugin to set the system MOTD. Demonstrates the external keyword and the JSON-over-stdio plugin protocol with a simple Python module.
Features used: external modules, plugin protocol, SSH proxy
host-module
Section titled “host-module”Run a command once on the controller (or a single named target) and broadcast the captured stdout to every host’s var map. Demonstrates cmd= strings, list-of-commands chaining, and on="<host>" remote execution.
Modules used: host, shell
jump-host
Section titled “jump-host”Connect to internal hosts through an SSH bastion (jump host). Demonstrates one jump host for every host, a per-host override, a host reached directly with jump #false, and user/port inheritance.
Features used: jump hosts, SSH tunneling
run-as
Section titled “run-as”Connect as an unprivileged user and escalate selected tasks with sudo, doas, or su. Shows inventory, step, and per-task run-as, including opting a single task out with run-as="".
Features used: run-as
secrets
Section titled “secrets”Keep variable values encrypted in a committed secrets.kdl. The plan references them like any other variable; glidesh decrypts them in memory and redacts them from output and logs.
Features used: secrets
shared-token
Section titled “shared-token”Generate one value on the controller and write that same value on every host. The host task runs once; register broadcasts its stdout.
Modules used: host, shell

