levant icon indicating copy to clipboard operation
levant copied to clipboard

Improve readme - escape Levant delimiter

Open afelinczak opened this issue 3 years ago • 0 comments

Description

In some Nomad jobs we want to ignore Levant delimiters. Good example is when we want to configure Telegraf using Template stanza

Relevant Nomad job specification file

 template {
        data = <<EOH
[agent]
  interval = "10s"
  omit_hostname = false
[[outputs.influxdb]]
  urls = ["http://influxdb.service.consul:8086"]
...
EOH
        destination = "local/telegraf.conf"
      }

This will fail to render as expecting outputs to be a function.

For users that ate not familiar with Go templates it is cumbersome how to fix it. Please add details how to escape delimiter into template readme.

[["[["]]outputs.influxdb]]

afelinczak avatar Nov 26 '21 08:11 afelinczak