ssh: use sshd instead of ssh to make it work on fedora
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
---
|
||||
|
||||
- name: Restart ssh
|
||||
ansible.builtin.systemd:
|
||||
name: ssh
|
||||
- name: Restart sshd
|
||||
ansible.builtin.systemd_service:
|
||||
name: sshd.service
|
||||
state: restarted
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
line: "{{ item.key }} {{ item.value }}"
|
||||
state: present
|
||||
validate: '/usr/sbin/sshd -t -f %s'
|
||||
notify: Restart ssh
|
||||
notify: Restart sshd
|
||||
with_dict:
|
||||
PermitRootLogin: 'prohibit-password'
|
||||
PasswordAuthentication: "{{ 'yes' if sshd_password_auth else 'no' }}"
|
||||
|
||||
Reference in New Issue
Block a user