mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 19:01:54 +00:00
Ansible renders templates with trim_blocks, so the newline after the
inline {% endif %} was swallowed and the config shipped
'LogLevel INFO# Authentication:'; sshd -t rejects that line and every
restart left the host without ssh (the swarm test caught it because the
backup node pulls over ssh right after the rollout). Inline expression
instead of block tags, and the commented upstream example defaults are
gone; the rendered directives are unchanged.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
16 lines
490 B
Django/Jinja
16 lines
490 B
Django/Jinja
LogLevel {{ 'DEBUG3' if MODE_DEBUG | bool else 'INFO' }}
|
|
PermitRootLogin no
|
|
PubkeyAuthentication yes
|
|
AuthorizedKeysFile .ssh/authorized_keys
|
|
PasswordAuthentication {{ (SYS_SVC_SSHD_PASSWORD_AUTHENTICATION | bool) | ternary('yes', 'no') }}
|
|
ChallengeResponseAuthentication no
|
|
GSSAPIAuthentication no
|
|
UsePAM yes
|
|
PrintMotd no
|
|
UseDNS no
|
|
{% if ansible_facts['os_family'] == "Archlinux" %}
|
|
Subsystem sftp /usr/lib/ssh/sftp-server
|
|
{% else %}
|
|
Subsystem sftp /usr/lib/openssh/sftp-server
|
|
{% endif %}
|