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
MaxAuthTries 6
MaxSessions 10
PasswordAuthentication
{%- if sshd__password_authentication | bool -%}
{{ ' yes' }}
{% else -%}
{{ ' no' }}
{% endif %}
PasswordAuthentication {{ sshd__password_authentication | ternary('yes', 'no') }}
ChallengeResponseAuthentication no
PubkeyAuthentication yes
PermitRootLogin without-password
LoginGraceTime 120
StrictModes yes
X11Forwarding
{%- if sshd__xforwarding | bool -%}
{{ ' yes' }}
{% else -%}
{{ ' no' }}
{% endif %}
X11Forwarding {{ sshd__xforwarding | ternary('yes', 'no') }}
AllowTcpForwarding yes
#GatewayPorts no