2019-05-07 08:18:30 +00:00
|
|
|
---
|
|
|
|
- name: "Set «PermitRootLogin» to «without-password»"
|
|
|
|
lineinfile:
|
|
|
|
dest: /etc/ssh/sshd_config
|
2023-06-03 11:41:32 +00:00
|
|
|
regexp: '^#* *PermitRootLogin'
|
2019-05-07 08:18:30 +00:00
|
|
|
line: "PermitRootLogin without-password"
|
|
|
|
backup: yes
|
|
|
|
|
|
|
|
|
|
|
|
- name: Restart sshd
|
|
|
|
service:
|
|
|
|
name: "{{ ssh_service_name }}"
|
|
|
|
state: restarted
|
|
|
|
sleep: 5
|
|
|
|
|
|
|
|
|