Files
ansible-en-role/tasks/ssh-config.yml
D025 EOD 41f491a0bd feat: move ssh password auth to dedicated task (#3)
## What 
Move task for disabling SSH password auth to dedicated task

## Why 
For more transparency

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [x] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [x] Documentation comments have been added / updated.
2024-03-06 15:29:36 +02:00

12 lines
273 B
YAML

---
- name: Disable SSH password authentication
ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config
regexp: '^#PasswordAuthentication yes'
line: 'PasswordAuthentication no'
- name: Restart ssh
ansible.builtin.service:
name: ssh
state: restarted