Skip to content

Commit

Permalink
fix(jinja): encode context as json
Browse files Browse the repository at this point in the history
Or with python2 the template are generated with `u'<string>'`.
  • Loading branch information
baby-gnu committed Jul 20, 2020
1 parent 7752132 commit 7a1f619
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions openssh/config.sls
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ sshd_config:
) }}
- template: jinja
- context:
sshd_config: {{ sshd_config }}
sshd_config: {{ sshd_config | json }}
- user: {{ openssh.sshd_config_user }}
- group: {{ openssh.sshd_config_group }}
- mode: {{ openssh.sshd_config_mode }}
Expand All @@ -40,7 +40,7 @@ ssh_config:
) }}
- template: jinja
- context:
ssh_config: {{ ssh_config }}
ssh_config: {{ ssh_config | json }}
- user: {{ openssh.ssh_config_user }}
- group: {{ openssh.ssh_config_group }}
- mode: {{ openssh.ssh_config_mode }}
Expand Down
2 changes: 1 addition & 1 deletion openssh/known_hosts.sls
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ manage ssh_known_hosts file:
) }}
- template: jinja
- context:
known_hosts: {{ openssh | traverse("known_hosts", {}) }}
known_hosts: {{ openssh | traverse("known_hosts", {}) | json }}
- user: root
- group: {{ openssh.ssh_config_group }}
- mode: 644
Expand Down

0 comments on commit 7a1f619

Please sign in to comment.