You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, we have a few variables such as $Values.zookeeper.job_namethat should be provided by either our defaults or the user. But if I wanted to make this field required I might set something like
[[ if $Values.zookeeper.job_name -]]
job "[[ $Values.zookeeper.job_name ]]" {
[[ else -]]
[[- "No job_name provided. Please include a value for zookeeper.job_name in your json file." | printf | exit -]]
[[ end -]]
Then calling Levant render would error out on that print statement.
Any help would be appreciated.
Thanks!
The text was updated successfully, but these errors were encountered:
Description
Hi, i'm new to levant/nomad and was following along with https://learn.hashicorp.com/tutorials/nomad/levant-abstract-jobs?in=nomad/templates. I was wondering if it's possible to forcibly exit or error out during rendering of a template.
For example, we have a few variables such as
$Values.zookeeper.job_name
that should be provided by either our defaults or the user. But if I wanted to make this field required I might set something likeThen calling Levant render would error out on that print statement.
Any help would be appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: