mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-11-14 07:20:19 +01:00
21 lines
528 B
Django/Jinja
21 lines
528 B
Django/Jinja
# {{ ansible_managed }}
|
|
{% macro render_option(key,override) %}
|
|
{% if override is defined %}
|
|
{% set value = override %}
|
|
{% elif sshd[key] is defined %}
|
|
{% set value = sshd[key] %}
|
|
{% endif %}
|
|
{% if value is defined %}
|
|
{% if value is sameas true %}
|
|
{{ key }} yes
|
|
{% elif value is sameas false %}
|
|
{{ key }} no
|
|
{% elif value is string or value is number %}
|
|
{{ key }} {{ value }}
|
|
{% else %}
|
|
{% for i in value %}
|
|
{{ key }} {{ i }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endmacro %}
|