Skip to content

Commit 5305a8f

Browse files
committed
Pass apt_conf context variables to the template as json object
Previously when passing the apt_conf context variable to the template the variables would not necessarily retain their correct type. An example of this would be when using a pillar value of `null` it would be passed to the template as the string `"None"` instead of type `None`. If we pass the apt_conf context variables to the template using a json object the variables retain their correct types.
1 parent b4cce02 commit 5305a8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apt/apt_conf.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
- group: root
3333
- mode: 644
3434
- context:
35-
data: {{ contents }}
35+
data: {{ contents|json }}
3636
- require_in:
3737
- file: {{ confd_dir }}
3838
{% endfor %}

0 commit comments

Comments
 (0)