From 1cd1f5834b0a707c1e8aaae9ebd945e8551e915e Mon Sep 17 00:00:00 2001 From: binary Date: Sun, 24 Jan 2021 12:48:08 +0100 Subject: Already enabled shown as success --- roles/pf/tasks/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'roles') diff --git a/roles/pf/tasks/main.yml b/roles/pf/tasks/main.yml index 4adc520..8263539 100644 --- a/roles/pf/tasks/main.yml +++ b/roles/pf/tasks/main.yml @@ -13,7 +13,8 @@ - name: enable pf shell: /sbin/pfctl -e - ignore_errors: true + register: result + failed_when: result.rc != 0 and "already enabled" not in result.stderr - name: restart pf shell: /sbin/pfctl -f /etc/pf.conf -- cgit v1.2.3