From c42662efa95cf782ae7515bf3d94b50223e6abc1 Mon Sep 17 00:00:00 2001 From: Matt Willsher Date: Sun, 24 Jan 2016 15:49:54 +0000 Subject: [PATCH] Use @luto solution Simple and just works! --- meta/10_top.j2 | 5 +---- templates/sshd_config.j2 | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/meta/10_top.j2 b/meta/10_top.j2 index 1870077..7499e24 100644 --- a/meta/10_top.j2 +++ b/meta/10_top.j2 @@ -16,18 +16,15 @@ {% endif %} {% endmacro %} {% macro body_option(key,override) %} +{% set value = undefined %} {% if override is defined %} {% set value = override %} {% elif sshd[key] is defined %} {% set value = sshd[key] %} {% elif sshd_defaults[key] is defined and sshd_skip_defaults != true %} {% set value = sshd_defaults[key] %} -{% else %} -{% set value = undefined %} {% endif %} -{% if value is defined %} {{ render_option(key,value) -}} -{% endif %} {% endmacro %} {% macro match_block(match_list) %} {% if match_list["Condition"] is defined %} diff --git a/templates/sshd_config.j2 b/templates/sshd_config.j2 index 367f2da..633b86d 100644 --- a/templates/sshd_config.j2 +++ b/templates/sshd_config.j2 @@ -16,18 +16,15 @@ {% endif %} {% endmacro %} {% macro body_option(key,override) %} +{% set value = undefined %} {% if override is defined %} {% set value = override %} {% elif sshd[key] is defined %} {% set value = sshd[key] %} {% elif sshd_defaults[key] is defined and sshd_skip_defaults != true %} {% set value = sshd_defaults[key] %} -{% else %} -{% set value = undefined %} {% endif %} -{% if value is defined %} {{ render_option(key,value) -}} -{% endif %} {% endmacro %} {% macro match_block(match_list) %} {% if match_list["Condition"] is defined %}