From 3c256ad4bc071685b35fe601fc5683a858914d80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Sat, 17 Dec 2022 21:58:37 +0100 Subject: refactor(roles/pf): modular test for open ports --- roles/pf/handlers/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'roles/pf/handlers') diff --git a/roles/pf/handlers/main.yml b/roles/pf/handlers/main.yml index 85a0996..2d518eb 100644 --- a/roles/pf/handlers/main.yml +++ b/roles/pf/handlers/main.yml @@ -5,10 +5,10 @@ - name: enable pf ansible.builtin.command: pfctl -e - register: result + register: pf_result_enable failed_when: - - result.rc != 0 - - "'already enabled' not in result.stderr" + - pf_result_enable.result.rc != 0 + - "'already enabled' not in pf_result_enabled.result.stderr" - name: restart pf ansible.builtin.command: pfctl -f "{{ pf_configuration_file }}" -- cgit v1.2.3