2014-12-21 21:29:13 +01:00
|
|
|
# {{ ansible_managed }}
|
2014-12-21 23:23:02 +01:00
|
|
|
{% macro render_option(key,override) %}
|
2014-12-21 21:29:13 +01:00
|
|
|
{% if override is defined %}
|
|
|
|
{% set value = override %}
|
|
|
|
{% elif sshd[key] is defined %}
|
|
|
|
{% set value = sshd[key] %}
|
2014-12-22 10:25:31 +01:00
|
|
|
{% elif sshd_defaults[key] is defined and sshd_skip_defaults != true %}
|
|
|
|
{% set value = sshd_defaults[key] %}
|
2014-12-21 21:29:13 +01:00
|
|
|
{% endif %}
|
|
|
|
{% if value is defined %}
|
2014-12-21 23:23:02 +01:00
|
|
|
{% if value is sameas true %}
|
|
|
|
{{ key }} yes
|
|
|
|
{% elif value is sameas false %}
|
|
|
|
{{ key }} no
|
|
|
|
{% elif value is string or value is number %}
|
2014-12-21 21:29:13 +01:00
|
|
|
{{ key }} {{ value }}
|
|
|
|
{% else %}
|
|
|
|
{% for i in value %}
|
|
|
|
{{ key }} {{ i }}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
{% endmacro %}
|