diff options
Diffstat (limited to 'roles/pf/handlers/main.yml')
-rw-r--r-- | roles/pf/handlers/main.yml | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/roles/pf/handlers/main.yml b/roles/pf/handlers/main.yml index 5d75a1a..2d518eb 100644 --- a/roles/pf/handlers/main.yml +++ b/roles/pf/handlers/main.yml @@ -1,12 +1,14 @@ +--- + - name: lint pf configuration - command: "pfctl -nf {{ pf_configuration_file }}" + ansible.builtin.command: "pfctl -nf {{ pf_configuration_file }}" - name: enable pf - command: pfctl -e - register: result + ansible.builtin.command: pfctl -e + 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 - command: pfctl -f "{{ pf_configuration_file }}" + ansible.builtin.command: pfctl -f "{{ pf_configuration_file }}" |