Set up ufw in Debian-like systems.
None
ufw_default_policy
[default:deny
]: Default policyufw_logging
[default:off
]: Log levelufw_rules
[default: seedefaults/main.yml
]: Rules to apply
None
---
- hosts: all
roles:
- ufw
- hosts: all
roles:
- ufw
vars:
ufw_rules:
- rule: allow
to_port: 22
protocol: tcp
- hosts: all
roles:
- ufw
vars:
ufw_rules:
- rule: allow
interface: eth1
to_port: ''
- hosts: all
roles:
- ufw
vars:
ufw_rules:
- rule: allow
interface: eth0
from_ip: 1.2.3.4
to_port: 161
protocol: udp
Make use of omit
, available in ansible 1.8
MIT
Mischa ter Smitten (based on work of weareinteractive)
Are welcome!