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