ansible-sshd/templates/sysconfig.j2
Rich Megginson 67d2339f03 Ensure values are cast to correct type
https://github.com/willshersystems/ansible-sshd/issues/188
This shouldn't be necessary, but there seems no way to
guarantee using a version of Jinja which doesn't have this
problem.

In addition - it is not good practice to compare values to
`true` or `false` - instead, just ensure the value is a `bool`
type and evaluate in a boolean context.
2022-08-16 08:36:57 +02:00

10 lines
296 B
Django/Jinja

{{ ansible_managed | comment }}
{% if __sshd_sysconfig_supports_crypto_policy %}
{% if sshd_sysconfig_override_crypto_policy | bool %}
CRYPTO_POLICY=
{% endif %}
{% endif %}
{% if __sshd_sysconfig_supports_use_strong_rng %}
SSH_USE_STRONG_RNG={{ sshd_sysconfig_use_strong_rng }}
{% endif %}