.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 runerrand 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
task.test from test.ern and computed.image from variables.ern:
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
errandblock across all files in the directory. - Files in subdirectories are ignored. Only
.ernfiles in the target directory are loaded. - Errand does not sort or prioritize files by name. All files are merged before any block is evaluated.