refactor(standardize): fix sudoers lecture syntax, extract ssh config, remove redundant os filters
This commit is contained in:
12
roles/configuration/tasks/ssh.yml
Normal file
12
roles/configuration/tasks/ssh.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
- name: Ensure SSH password authentication is enabled
|
||||
ansible.builtin.lineinfile:
|
||||
path: /mnt/etc/ssh/sshd_config
|
||||
regexp: "^#?PasswordAuthentication\\s+"
|
||||
line: "PasswordAuthentication yes"
|
||||
|
||||
- name: SSH permit root login
|
||||
ansible.builtin.replace:
|
||||
path: /mnt/etc/ssh/sshd_config
|
||||
regexp: "^#?PermitRootLogin.*"
|
||||
replace: "PermitRootLogin yes"
|
||||
Reference in New Issue
Block a user