Template Syntax
May 8, 2026 ยท View on GitHub
Expressions in tasks and templates follow Go template conventions, with Sprig function extensions.
Custom Functions
toYaml
Converts a variable to a YAML string. Optional parameter is the number of indentation spaces.
{{ .yaml_variable | toYaml }}
fromYaml
Parses a YAML string into a variable.
{{ .yaml_string | fromYaml }}
ipInCIDR
Returns all IP addresses (as an array) within the CIDR range.
{{ .cidr_variable | ipInCIDR }}
ipFamily
Returns the address family of an IP or IP_CIDR. Values: Invalid, IPv4, IPv6.
{{ .ip | ipFamily }}
pow
Power operation.
# 2 to the power of 3, i.e., 2 ** 3
{{ 2 | pow 3 }}
subtractList
Array difference: returns a new list containing elements that exist in the first argument but not in the second.
{{ .b | subtractList .a }}
fileExist
Checks if a file exists at the given path.
{{ .file_path | fileExists }}