From de20aa655ac266eb57c06cc0b99042359ac0db83 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 4 Jun 2020 20:17:49 +0200 Subject: [PATCH] Use systemd handlers --- handlers/main.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index 8029b2f..ff7a82b 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -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