mirror of
https://github.com/pikami/mail-server.git
synced 2026-01-30 15:22:54 +00:00
Extract playbook actions to roles
This commit is contained in:
11
ansible/roles/firewall/tasks/main.yml
Normal file
11
ansible/roles/firewall/tasks/main.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: Configure firewall
|
||||
template:
|
||||
src: templates/pf.conf.j2
|
||||
dest: /etc/pf.conf
|
||||
validate: pfctl -n -f %s
|
||||
register: pf
|
||||
|
||||
- name: Load config to pf if needed
|
||||
command: pfctl -f /etc/pf.conf
|
||||
when: pf.changed
|
||||
Reference in New Issue
Block a user