paulbsd-salt/states/ssh/sshd_config.j2

22 lines
655 B
Plaintext
Raw Normal View History

2020-07-30 14:10:22 +02:00
## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
{%- from "ssh/map.jinja" import ssh with context %}
2020-07-10 00:58:55 +02:00
2020-09-24 00:35:01 +02:00
{%- set net4=[] %}
2020-07-10 00:58:55 +02:00
{%- 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 -%}
{%- for key, value in ssh.config.items() %}
{{ key }} {{ value }}
{%- endfor %}
Match Address {{ net4|join(',') }}
PasswordAuthentication yes
Match Address {{ net6|join(',') }}
2020-07-30 14:10:22 +02:00
PasswordAuthentication yes