From fd22532d934c5e3614d6aab7d75a9950e47e88e9 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Thu, 20 May 2021 16:34:26 +0200 Subject: [PATCH] Update source template files used to generate final template --- meta/20_middle.j2 | 9 +++++++++ meta/30_bottom.j2 | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/meta/20_middle.j2 b/meta/20_middle.j2 index a96e46a..5108a75 100644 --- a/meta/20_middle.j2 +++ b/meta/20_middle.j2 @@ -1,3 +1,12 @@ {% endfor %} {% endif %} {% endmacro %} +{% macro match_iterate_block(match_list) %} +{% if match_list | type_debug == "list" %} +{% for match in match_list %} +{{ match_block(match) -}} +{% endfor %} +{% else %} +{{ match_block(match_list) -}} +{% endif %} +{% endmacro %} diff --git a/meta/30_bottom.j2 b/meta/30_bottom.j2 index 252ed85..5408f0b 100644 --- a/meta/30_bottom.j2 +++ b/meta/30_bottom.j2 @@ -1,8 +1,8 @@ {% if sshd['Match'] is defined %} -{{ match_block(sshd['Match']) -}} +{{ match_iterate_block(sshd['Match']) -}} {% endif %} {% if sshd_match is defined %} -{{ match_block(sshd_match) -}} +{{ match_iterate_block(sshd_match) -}} {% endif %} {% if sshd_match_1 is defined %} {{ match_block(sshd_match_1) -}}