Skip to content

Workflows

A workflow joins steps into a directed graph. Steps whose dependencies are met run in parallel; each dependency has a condition that decides whether the next step runs, is skipped, or handles a failure.

Provision FSN1 ─┐
Provision HEL1 ─┼─► Build inventory ─┬─► Install Containerd ─► Hetzner Kubernetes
Provision NBG1 ─┘                    └─► Create SSH users

Hetzner Kubernetes ─┬─► Install Node Exporter ─► Install Logger
                    └─► Kubernetes Bootstrap ─┬─► Kubernetes Post-Install
                                              └─(on failure)─► Collect diagnostics

Build a workflow

Workflows → New workflow opens the builder: a canvas on one side, the selected step's settings on the other.

  • Add a step and choose its type (see below). New job steps are created from existing templates; filter the list by template type.
  • Connect steps by clicking a step's output port and then another step's input port, or pick predecessors under Run after (multiple allowed).
  • Drag steps to arrange them; positions are saved with the workflow. Auto layout arranges and fits the whole graph; zoom and Fit help on large graphs.
  • A step name follows its template's name until you change it.

Limits: up to 30 steps, each with up to 30 dependencies; the saved definition may not exceed 500 KB. Step IDs are lowercase letters, digits and hyphens, starting with a letter. Cycles, unknown dependencies and duplicate dependencies are rejected when you save.

Step types

Type What it does Runs on
Job template Runs an Ansible, Bash or Terraform template a runner
Sync Project Syncs a project's Git repository the controller
Sync Inventory Syncs the project, then imports a Git inventory the controller
Approval Waits for someone to approve or reject —
Build inventory Turns a Terraform step's runway_hosts output into an Ansible inventory the controller

Sync steps and late resolution

Put Sync Inventory before a job with On success and the job uses the hosts that sync just imported. Put Sync Project first and the job runs the commit that sync just pinned.

When a workflow contains any sync, approval or build step, Liftway changes when it resolves job steps:

  • template definitions are frozen at launch;
  • the project commit, inventory content, credentials and execution environment of each job step are frozen right before that step starts, after its dependencies finished.

Without such steps, everything is frozen at launch. A sync step has its own status and output, and supports all three conditions. If the controller restarts during a sync, the sync may run again (it only reads Git).

Steps without a dependency between them can run in any order. The position on the canvas never implies order — only connections do.

Approval

An approval step waits in status waiting until someone approves or rejects it in the run view, or until its timeout passes (60 seconds to 7 days, default 1 day).

  • Approve → the step is successful; On success branches continue.
  • Reject or timeout → the step is failed; On failure branches run.

Decisions and deadlines survive controller restarts. A waiting approval uses no runner slot, and a parallel branch keeps running while another branch waits. The decision, who made it and when are recorded in the run and the audit trail. Approving requires permission to call the approval endpoint; see Roles and permissions.

Terraform plans have their own built-in review gate; you do not need an approval step in front of a Terraform apply. See Terraform.

Build inventory

A Build inventory step reads the runway_hosts output of one Terraform step — its inventory source — and produces an inventory for later Ansible steps in the same run.

  • The source must be a direct dependency with On success, and use a template with Liftway managed state and Plan → Review → Apply.
  • The Build inventory step may depend on other steps too (for example three regional Terraform steps), but it reads hosts from its chosen source only.
  • An Ansible step that should use the result selects that Build inventory step as its inventory and depends on it On success.

Format and rules: Terraform → From Terraform outputs to Ansible inventory.

Conditions

A step waits until all of its dependencies have finished, then checks its condition:

Condition The step runs when… Otherwise
On success (default) every dependency is successful skipped
On failure at least one dependency is failed skipped
Always always, once all dependencies finished — including skipped ones —

Consequences worth knowing:

  • A step with no dependencies starts immediately; several such steps start in parallel.
  • A step with several dependencies is a join.
  • skipped spreads: an On success step after a skipped step is skipped too.
  • On failure cannot be used on a step without dependencies.
  • The run is failed if any step failed, even if a failure handler then succeeded. A handler records what you did about a failure; it does not erase it.
  • Liftway never generates a rollback. A rollback is a step you write and connect with On failure.

Workflow configuration

The Workflow configuration panel holds settings shared by all steps:

Setting Applies to
Workflow inventory Ansible steps that do not set a step inventory
Ansible workflow variables (JSON) Extra variables for every Ansible step
Workflow credentials Runtime credentials added to every job step

Per step, Additional configuration offers a step inventory, job variable overrides (JSON) and additional step credentials.

Which value wins

Inventory for an Ansible step, first match wins:

  1. the inventory chosen for that step at launch;
  2. the step inventory (or its Build inventory source);
  3. the workflow inventory;
  4. the template's default inventory;
  5. otherwise the launch asks for one.

Extra variables, later entries override earlier ones:

workflow variables  <  template extra variables  <  step overrides  <  survey answers

Credentials from the template, the workflow and the step are combined. Bash and Terraform steps accept only environment-variable credentials; two credentials writing the same destination are rejected at launch.

Launch a workflow

Launch asks for anything the steps need: inventories, survey answers and launch options for templates that allow them. Through the API:

POST /api/workflows/{id}/runs
Content-Type: application/json

{
  "inventories": {"deploy": "<inventory-id>"},
  "surveys":     {"deploy": {"release": "2026.11.23"}},
  "overrides":   {"deploy": {"limit": "web-01"}}
}

Keys of each object are step IDs. The response is 202 Accepted with the run.

Capacity

Liftway runs at most maxParallel steps at once across the whole installation (default 4), no matter how many workflows or controllers there are. A step holds a slot while it is starting or running; extra steps wait in pending. Sync and Build inventory steps need a free slot to start but finish on the controller within moments. Steps in waiting — approvals and Terraform plans under review — hold no slot. Ask your administrator about the value set for your installation; see High availability and scale.

Examples

Preflight, parallel checks, summary

preflight ──┬── system inspection ──┬── summary
            └── verify config ──────┘

Both checks start when preflight succeeds; summary waits for both.

Deploy with a handler and cleanup

deploy ──on success──► verify
   └────on failure──► notify on-call
verify ──always──────► remove maintenance banner

Create servers, then configure them

Terraform: provision ──► Build inventory ──► Ansible: base configuration ──► Ansible: application

Older workflows

Workflows created before templates existed may contain steps with an inline playbook. They stay readable and runnable; the builder labels them legacy and lets you replace each with a template step.

Delete a workflow

Deleting a workflow removes its definition. Runs that already happened stay in Jobs until retention removes them.