diff --git a/services/service/service_template.nomad b/services/service/service_template.nomad index ccc4b04..d2faa08 100644 --- a/services/service/service_template.nomad +++ b/services/service/service_template.nomad @@ -31,10 +31,18 @@ job "${name}" { %{~ endif ~} %{~ for port in ports } port "${port.name}" { - %{ if port.host_network != null }host_network = "${port.host_network}"%{ endif ~} - %{ if port.from != null }to = ${port.from}%{ endif ~} - %{ if port.to != null }to = ${port.to}%{ endif ~} - %{ if port.static != null }static = ${port.static}%{ endif ~} + %{~ if port.host_network != null ~} + host_network = "${port.host_network}" + %{~ endif ~} + %{~ if port.from != null ~} + from = ${port.from} + %{~ endif ~} + %{~ if port.to != null ~} + to = ${port.to} + %{~ endif ~} + %{~ if port.static != null ~} + static = ${port.static} + %{~ endif ~} } %{~ endfor ~} }