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:
parent
a57ef169c5
commit
132e656992
1 changed files with 2 additions and 12 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue