Skip to main content
Errand loads all .ern files in the target directory and merges them into one playbook. You can use this to split a large playbook into focused files.

How it works

When you run errand run, Errand reads every .ern file in the directory (non-recursively) and merges their blocks as if they were written in a single file. Variables, computed values, and tasks from different files can reference each other without any imports.

Example

Organize a project by concern, one file per area:
project
variables.ern
test.ern
build.ern
deploy.ern
variables.ern: shared inputs and computed values used by all other files:
test.ern
build.ern: references task.test from test.ern and computed.image from variables.ern:
deploy.ern
Run from the project directory:

Pointing to a specific directory

By default, Errand loads from the current directory. Use --dir to specify another:

Notes

  • Block names must be unique across all files. Declaring task "build" in two files is an error.
  • You can have at most one errand block across all files in the directory.
  • Files in subdirectories are ignored. Only .ern files in the target directory are loaded.
  • Errand does not sort or prioritize files by name. All files are merged before any block is evaluated.