Skip to content

Commit

Permalink
fix(apt_conf): pass context variables to the template as JSON object
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jerrykan committed Jan 4, 2021
1 parent b4cce02 commit d553e46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apt/apt_conf.sls
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
- group: root
- mode: 644
- context:
data: {{ contents }}
data: {{ contents|json }}
- require_in:
- file: {{ confd_dir }}
{% endfor %}

0 comments on commit d553e46

Please sign in to comment.