Declarative Linux configuration
Know what will change.
Then apply it.
Richt turns YAML inventory into an executable host configuration plan. Define packages, files, and systemd processes. Inspect the changes before they reach your hosts.
A deliberate workflow
From desired state to reviewed action.
Preparation observes your hosts.
Apply changes them with your agreement.
- 01
Define
Assign ordered services to hosts in a YAML inventory.
- 02
Diff
Render templates and compare the desired state with the target.
- 03
Review
Inspect file changes, operations, and execution order.
- 04
Apply
Confirm the plan and execute its prepared inputs.
Start small
One host. One managed file.
The repository’s local example writes a templated greeting to /var/tmp/richt-example/greeting.conf. Try it on a disposable Linux machine.
tags:
example:
services:
greeting: {state: present}
order: 10
vars:
greeting: Hello from Richt
services:
greeting:
order: 10
file: service.yaml
hosts:
- name: localhost
tags: [example]
transport:
type: local
# Inspect inventory without contacting hosts
./bin/richt inventory validate -i examples/files/inventory.yaml
# Observe changes and save prepared inputs
./bin/richt diff -i examples/files/inventory.yaml \
-o /var/tmp/richt-example-plan.json
# Review the saved plan, then confirm
./bin/richt apply /var/tmp/richt-example-plan.jsonmake build first. Apply requires terminal agreement unless you explicitly pass -y.Services hold the resource details. See the service definition and Go template, or explore all runnable examples.
Prepared inputs. Explicit execution.
The plan is the handoff.
Prepare once, apply what you reviewed.
Saved JSON holds executable operations and rendered file contents. Apply uses those inputs without rereading inventory, templates, or secret sources, or recalculating the diff. How saved plans work
Use the host access you already have.
SSH uses your system OpenSSH client, current client configuration, keys, and agent. Sudo is explicit and noninteractive. Host execution is bounded; services stay ordered within each host. SSH and parallel apply
Continue with the same plan.
Progress is saved per task. A new explicit apply skips successful tasks and retries unfinished ones. A failed host blocks its later tasks while other hosts continue. Failure and continuation
Keep sensitive changes out of the display.
Local YAML secret sources resolve during preparation. Using a secret hides the entire file diff. Executable plans retain the real content and must stay private. Secrets and sensitive files
Build it. Inspect it. Try it.
Start with a change you can read.
Build Richt from source and walk through the local file example.