From 500c915c338aa2e24d0f7c1f771963657dd982a3 Mon Sep 17 00:00:00 2001 From: Andres Montalban Date: Thu, 27 Jul 2017 19:55:34 -0300 Subject: [PATCH] Allow to config banner in pillar --- openssh/banner.sls | 5 +++++ pillar.example | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/openssh/banner.sls b/openssh/banner.sls index f301a09..362729c 100644 --- a/openssh/banner.sls +++ b/openssh/banner.sls @@ -6,5 +6,10 @@ include: sshd_banner: file.managed: - name: {{ openssh.banner }} + {% if openssh.banner_string is defined %} + - contents: | + {{ openssh.banner_string }} + {% else %} - source: {{ openssh.banner_src }} - template: jinja + {% endif %} diff --git a/pillar.example b/pillar.example index 4aa3b2e..6c40341 100644 --- a/pillar.example +++ b/pillar.example @@ -177,6 +177,10 @@ ssh_config: openssh: + # Instead of adding a custom banner file you can set it in pillar + banner_string: | + Welcome to {{ grains['id'] }}! + # Controls if SSHD should be enabled/started sshd_enable: true auth: