From 7fed657b7728d36a8635695afc147ebd5dda0830 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Thu, 8 Mar 2018 21:54:50 +0800 Subject: security: restart syslogd and reload pf --- roles/security/handlers/main.yml | 3 +++ roles/security/tasks/main.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/roles/security/handlers/main.yml b/roles/security/handlers/main.yml index e63d093..d4926b7 100644 --- a/roles/security/handlers/main.yml +++ b/roles/security/handlers/main.yml @@ -1,3 +1,6 @@ --- +- name: restart-syslogd + command: rcrestart syslogd + - name: reload-pf command: rcreload pf diff --git a/roles/security/tasks/main.yml b/roles/security/tasks/main.yml index 0a7ef0f..08780a5 100644 --- a/roles/security/tasks/main.yml +++ b/roles/security/tasks/main.yml @@ -4,6 +4,7 @@ src: pf.conf.j2 dest: /etc/pf.conf validate: "pfctl -nf %s" + notify: reload-pf - name: firewall - enable PF command: rcenable pf @@ -18,6 +19,7 @@ block: | # Block SSH auth failures using "sshlockout" and "pf" auth.info;authpriv.info |exec /usr/sbin/sshlockout -pf bruteforce + notify: restart-syslogd - name: periodic - copy clean-pf script copy: -- cgit v1.2.2