1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_sshd.git synced 2024-08-16 11:59:49 +02:00

use ternary('yes', 'no')

This commit is contained in:
L3D 2020-08-04 15:49:36 +02:00 committed by L3D
parent a57ef169c5
commit 132e656992
No known key found for this signature in database
GPG key ID: 5215C3441797AB2B

View file

@ -63,23 +63,13 @@ HostKey /etc/ssh/ssh_host_{{ key }}_key
# Client authentication # Client authentication
MaxAuthTries 6 MaxAuthTries 6
MaxSessions 10 MaxSessions 10
PasswordAuthentication PasswordAuthentication {{ sshd__password_authentication | ternary('yes', 'no') }}
{%- if sshd__password_authentication | bool -%}
{{ ' yes' }}
{% else -%}
{{ ' no' }}
{% endif %}
ChallengeResponseAuthentication no ChallengeResponseAuthentication no
PubkeyAuthentication yes PubkeyAuthentication yes
PermitRootLogin without-password PermitRootLogin without-password
LoginGraceTime 120 LoginGraceTime 120
StrictModes yes StrictModes yes
X11Forwarding X11Forwarding {{ sshd__xforwarding | ternary('yes', 'no') }}
{%- if sshd__xforwarding | bool -%}
{{ ' yes' }}
{% else -%}
{{ ' no' }}
{% endif %}
AllowTcpForwarding yes AllowTcpForwarding yes
#GatewayPorts no #GatewayPorts no