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