<p>Im using the following file by helm</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: nginx-cfg
data:
  default.conf: |-
  {{ .Files.Get &quot;config/nginx.conf&quot; | nindent 4 }}
</code></pre>
<p>and I got the following error:</p>
<p><strong>Error: YAML parse error on ops/templates/config/nginx.conf: error converting YAML to JSON: yaml: line 4: mapping values are not allowed in this context</strong></p>
<p>The nginx file looks like following</p>
<p><code>nginx.conf</code></p>
<pre><code>server {
    listen       80;
    listen  [::]:80;
    server_name: {{ print &quot;kiftb.&quot; .Values.global.host | quote }} // this is the error line
...
</code></pre>
<p>The line with the <code>sever_name</code> create the error.</p>
<p>Any idea how to solve it?</p>
<p><strong>update</strong></p>
<p>As suggested by @Evan I've tried to remove the colon,</p>
<pre><code>server_name {{ print &quot;kiftb.&quot; .Values.global.host | quote }}
</code></pre>
<p>And I got an error:</p>
<pre><code>error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go value of type releaseutil.SimpleHead
helm.go:81: [debug] error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go value of type releaseutil.SimpleHead
</code></pre>
<p>Any Idea how to overcome this? is there any workaround ?</p>

<p>Try removing the colon after <code>server_name</code>.</p>
<pre><code>server_name {{ print &quot;kiftb.&quot; .Values.global.host | quote }}
</code></pre>
<p>...</p>
