aboutsummaryrefslogtreecommitdiffstats
path: root/roles/pf/tasks/main.yml
blob: 4adc5202efb699d06b5e14187012a95c4f938348 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

# pf ~~ tasks/main.yml

---

- name: generate pf configuration
  template:
    src: templates/pf.conf.j2
    dest: /etc/pf.conf
    owner: "{{ user_root }}"
    group: "{{ group_root }}"
    mode: 0600

- name: enable pf
  shell: /sbin/pfctl -e
  ignore_errors: true

- name: restart pf
  shell: /sbin/pfctl -f /etc/pf.conf

- name: test ssh connection on new pf rule
  wait_for:
    port: 22
    delay: 2
    state: started

remember that computers suck.