mirror of
https://github.com/matter-labs/ansible-en-role.git
synced 2025-12-06 02:49:55 +00:00
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.
This commit is contained in:
@ -65,16 +65,3 @@
|
||||
ip_version: ipv6
|
||||
state: saved
|
||||
path: /etc/iptables/rules.v6
|
||||
|
||||
- name: Disable SSH password authentication
|
||||
when: disable_ssh_password_auth
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/ssh/sshd_config
|
||||
regexp: '^#PasswordAuthentication yes'
|
||||
line: 'PasswordAuthentication no'
|
||||
|
||||
- name: Restart ssh
|
||||
when: disable_ssh_password_auth
|
||||
ansible.builtin.service:
|
||||
name: ssh
|
||||
state: restarted
|
||||
|
||||
Reference in New Issue
Block a user