diff options
Diffstat (limited to 'roles/pf/tasks/main.yml')
-rw-r--r-- | roles/pf/tasks/main.yml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/roles/pf/tasks/main.yml b/roles/pf/tasks/main.yml index c47a721..51471c5 100644 --- a/roles/pf/tasks/main.yml +++ b/roles/pf/tasks/main.yml @@ -11,5 +11,24 @@ 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 + +- name: Add cron job for pf + cron: + cron_file: /etc/crontab + name: "Reload pf configuration" + user: root + job: "/sbin/pfctl -f /etc/pf.conf > /dev/nul 2>&1" + minute: "*" + |