aboutsummaryrefslogtreecommitdiffstats
path: root/roles/pf/handlers/main.yml
blob: 2d518eb4c62a2371d93ef8d4a2387c536ca4ea52 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
---

- name: lint pf configuration
  ansible.builtin.command: "pfctl -nf {{ pf_configuration_file }}"

- name: enable pf
  ansible.builtin.command: pfctl -e
  register: pf_result_enable
  failed_when:
    - 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 }}"
remember that computers suck.