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