Browse Source

Allow to config banner in pillar

master
Andres Montalban 7 years ago
parent
commit
500c915c33
2 changed files with 9 additions and 0 deletions
  1. +5
    -0
      openssh/banner.sls
  2. +4
    -0
      pillar.example

+ 5
- 0
openssh/banner.sls View File

@@ -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 %}

+ 4
- 0
pillar.example View File

@@ -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:

Loading…
Cancel
Save