From dea389b8e65f0222e8f618c15530a0d0172c728e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Tue, 21 Dec 2021 17:36:10 +0000 Subject: roles/pf: Pass ansible-lint --- roles/pf/handlers/main.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'roles/pf/handlers') diff --git a/roles/pf/handlers/main.yml b/roles/pf/handlers/main.yml index 187e769..5d75a1a 100644 --- a/roles/pf/handlers/main.yml +++ b/roles/pf/handlers/main.yml @@ -1,2 +1,12 @@ - name: lint pf configuration command: "pfctl -nf {{ pf_configuration_file }}" + +- name: enable pf + command: pfctl -e + register: result + failed_when: + - result.rc != 0 + - "'already enabled' not in result.stderr" + +- name: restart pf + command: pfctl -f "{{ pf_configuration_file }}" -- cgit v1.2.3