NB5 Docs► Reference Section► Workload Specification▼ Template Variables 🖺

Template Variables

Template variables allow for workload descriptions to be parameterized outside the structure of the templating language.

Template variables are resolved in the workload after the on-disk format is loaded and before yaml parsing.

angle bracket value with defaults

yaml:

name: <<myname,thedefault>>
desc: <<mydesc:mydescription>>

json:


{
    "name": "thedefault",
    "desc": "mydescription"
}

ops:


[]

It's easier on syntax checkers if you use this form.

call form with defaults

yaml:

name: TEMPLATE(myname,thedefault)

json:


{
    "name": "thedefault"
}

ops:


[]

call form with no default, requires input

yaml:

name: TEMPLATE(myname)

json:


{
    "name": "UNSET:myname"
}

ops:


[]

call form with null default

yaml:

name: TEMPLATE(myname,)

json:


{
    "name": null
}

ops:


[]