template
!template
Category: files
Render a local template, optionally composing sorted include_dir fragments, and install it atomically on the execution target. Preserve existing file metadata unless explicitly overridden.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
src | string | yes | Local template filename (looked up under the templates directory). |
dest | path | yes | Remote destination path for the rendered file. |
validate | string | no | Target-side validator command with exactly one standalone {} candidate argument; no shell syntax. Plan never runs it. |
chdir | path | no | Absolute execution-target working directory for validation and file operations. |
attributes | map | no | File attributes applied to the rendered file: owner, group, mode. |
Examples
- !template
src: nginx.conf.j2
dest: /etc/nginx/nginx.conf