Use systemd handlers
This commit is contained in:
parent
bad44f0d33
commit
de20aa655a
|
@ -12,15 +12,11 @@
|
|||
regexp: "^.*PermitRootLogin.*$"
|
||||
replace: "PermitRootLogin no"
|
||||
notify:
|
||||
- Reload SSH service
|
||||
- Run service actions
|
||||
- name: Disable SSH password authentication
|
||||
replace:
|
||||
path: /etc/ssh/sshd_config
|
||||
regexp: "^.*PasswordAuthentication.*$"
|
||||
replace: "PasswordAuthentication no"
|
||||
notify:
|
||||
- Reload SSH service
|
||||
- name: Reload SSH service
|
||||
systemd:
|
||||
name: ssh
|
||||
state: reloaded
|
||||
- Run service actions
|
||||
|
|
Reference in New Issue