paulbsd-salt/states/ssh/sshd_config.j2

20 lines
654 B
Plaintext
Raw Normal View History

2020-07-10 00:58:55 +02:00
{%- from "ssh/map.jinja" import ssh with context -%}
{% set net4=[] -%}
{%- for key, value in salt['pillar.get']('net:ipv4_networks').items() -%}
{%- do net4.append( value.ip + "/" + value.mask ) -%}
{%- endfor -%}
{%- set net6=[] -%}
{%- for key, value in salt['pillar.get']('net:ipv6_networks').items() -%}
{%- do net6.append( value.ip + "/" + value.mask ) -%}
{%- endfor -%}
## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
{%- for key, value in ssh.config.items() %}
{{ key }} {{ value }}
{%- endfor %}
Match Address {{ net4|join(',') }}
PasswordAuthentication yes
Match Address {{ net6|join(',') }}
PasswordAuthentication yes