mirror of
https://github.com/matter-labs/ansible-en-role.git
synced 2025-12-06 10:59:56 +00:00
## 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.
12 lines
273 B
YAML
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
|