aboutsummaryrefslogtreecommitdiffstats
path: root/roles/pf/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'roles/pf/handlers')
-rw-r--r--roles/pf/handlers/main.yml10
1 files changed, 10 insertions, 0 deletions
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 }}"
remember that computers suck.