Skip to content

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.

A minimal example that deploys an HTTP echo server. Great starting point.

Modules used: shell, container

View source →

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

View source →

Create deploy users with specific shells, groups, and SSH authorized keys.

Modules used: user, file, shell

View source →

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

View source →

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

View source →

Discover available disks dynamically, then format and mount each one using register and loop.

Modules used: disk, shell, register, loop

View source →

A multi-group setup with web, app, and database tiers. Uses plan includes for shared configuration.

Modules used: include, package, file, systemd, container, shell

View source →

Install packages via Nix on any distribution, run commands in ephemeral Nix shells, manage channels, and garbage collect the store.

Modules used: nix

View source →

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

View source →

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

View source →

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

View source →

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

View source →

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

View source →

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

View source →