瀏覽代碼

Merge pull request #1 from amontalban/banner_fix

Allow to configure SSH banner text in pillar
master
Andres Montalban 7 年之前
父節點
當前提交
3e7f6f7648
共有 5 個文件被更改,包括 21 次插入12 次删除
  1. +5
    -0
      openssh/banner.sls
  2. +3
    -3
      openssh/files/banner
  3. +8
    -8
      openssh/files/fire_banner
  4. +1
    -1
      openssh/map.jinja
  5. +4
    -0
      pillar.example

+ 5
- 0
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 %}

+ 3
- 3
openssh/files/banner 查看文件

@@ -2,11 +2,11 @@ Welcome to {{ grains['id'] }}!

Managed By

_____ ____ _____ __ __
_____ ____ _____ __ __
/ ___/____ _/ / /_/ ___// /_____ ______/ /__
\__ \/ __ `/ / __/\__ \/ __/ __ `/ ___/ //_/
___/ / /_/ / / /_ ___/ / /_/ /_/ / /__/ ,<
/____/\__,_/_/\__//____/\__/\__,_/\___/_/|_|
___/ / /_/ / / /_ ___/ / /_/ /_/ / /__/ ,<
/____/\__,_/_/\__//____/\__/\__,_/\___/_/|_|


Make sure changes get pushed into the state repo!

+ 8
- 8
openssh/files/fire_banner 查看文件

@@ -1,13 +1,13 @@
Welcome to {{ grains['id'] }}!

Managed By
( (
)\ ) ( ) )\ ) ) )
(()/( ) )\ ( /((()/( ( /( ) ( /(
/(_))( /( ((_))\())/(_)))\())( /( ( )\())
(_)) )(_)) _ (_))/(_)) (_))/ )(_)) )\ ((_)\
/ __|((_)_ | || |_ / __|| |_ ((_)_ ((_)| |(_)
\__ \/ _` || || _|\__ \| _|/ _` |/ _| | / /
|___/\__,_||_| \__||___/ \__|\__,_|\__| |_\_\
( (
)\ ) ( ) )\ ) ) )
(()/( ) )\ ( /((()/( ( /( ) ( /(
/(_))( /( ((_))\())/(_)))\())( /( ( )\())
(_)) )(_)) _ (_))/(_)) (_))/ )(_)) )\ ((_)\
/ __|((_)_ | || |_ / __|| |_ ((_)_ ((_)| |(_)
\__ \/ _` || || _|\__ \| _|/ _` |/ _| | / /
|___/\__,_||_| \__||___/ \__|\__,_|\__| |_\_\

Make sure changes get pushed into the state repo!

+ 1
- 1
openssh/map.jinja 查看文件

@@ -1,7 +1,7 @@
{## Start with defaults from defaults.yaml ##}
{% import_yaml "openssh/defaults.yaml" as default_settings %}

{##
{##
Setup variable using grains['os_family'] based logic, only add key:values here
that differ from whats in defaults.yaml
##}

+ 4
- 0
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:

Loading…
取消
儲存