From 6400516c5e33bb5216a238dbb703afef06b4ec0f Mon Sep 17 00:00:00 2001 From: Brian Holland Date: Tue, 15 Aug 2017 23:08:23 -0400 Subject: [PATCH] Add ConfigBanner to processed_options when handled. This prevents a verbatim version being added to end of file that will cause the parsing to fail. --- openssh/files/sshd_config | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openssh/files/sshd_config b/openssh/files/sshd_config index fafb1c6..b0ca8d4 100644 --- a/openssh/files/sshd_config +++ b/openssh/files/sshd_config @@ -74,9 +74,10 @@ {%- endmacro -%} {%- if sshd_config.get('ConfigBanner', False) -%} -{{ sshd_config['ConfigBanner'] }} + {%- do processed_options.append('ConfigBanner') -%} + {{ sshd_config['ConfigBanner'] }} {%- else -%} -# This file is managed by salt. Manual changes risk being overwritten. + # This file is managed by salt. Manual changes risk being overwritten. {%- endif %} {%- set global_src_url = salt ['pillar.get']('__formulas:print_template_url', None) %} {%- set local_src_url = salt ['pillar.get']('openssh-formula:print_template_url', None) %}