2019-07-04 01:07:34 +02:00
|
|
|
{%- set tplroot = tpldir.split('/')[0] %}
|
|
|
|
{%- from tplroot ~ "/map.jinja" import openssh with context %}
|
|
|
|
{%- from tplroot ~ "/libtofs.jinja" import files_switch %}
|
2014-01-04 03:32:05 +01:00
|
|
|
|
|
|
|
include:
|
|
|
|
- openssh
|
|
|
|
|
|
|
|
sshd_banner:
|
|
|
|
file.managed:
|
|
|
|
- name: {{ openssh.banner }}
|
2019-07-04 01:07:34 +02:00
|
|
|
{%- if openssh.banner_string is defined %}
|
2017-08-10 14:48:02 +02:00
|
|
|
- contents: {{ openssh.banner_string | yaml }}
|
2019-07-04 01:07:34 +02:00
|
|
|
{%- else %}
|
|
|
|
{#- Preserve backward compatibility using the `if` below #}
|
|
|
|
- source: {{ openssh.banner_src if '://' in openssh.banner_src
|
2019-06-25 06:31:34 +02:00
|
|
|
else files_switch( [openssh.banner_src],
|
2019-07-04 01:07:34 +02:00
|
|
|
'sshd_banner'
|
2019-06-25 06:31:34 +02:00
|
|
|
) }}
|
2014-01-04 03:32:05 +01:00
|
|
|
- template: jinja
|
2019-07-04 01:07:34 +02:00
|
|
|
{%- endif %}
|