Ansible role to manage UFW (Uncomplicated Firewall), a firewall configuration tool for Ubuntu/Debian systems.
ansible-galaxy install markahesketh.ufw
Default values are listed below (see defaults/main.yml
):
ufw_default_policy: deny
ufw_rules:
- to_port: 22
rule: limit
- to_port: 80
rule: allow
- to_port: 443
rule: allow
The ufw_rules
variable is an array of objects, with the following options from the UFW module:
ufw_rules:
- to_port:
rule:
proto:
to_ip:
from_port:
from_ip:
interface:
direction:
log:
You can specify the firewall's default policy with the ufw_default_policy
variable, which accepts allow
, deny
and reject
as options.
ufw_default_policy: "allow|deny|reject"
None.
- hosts: web
roles:
- markahesketh.ufw
molecule test
This role is open-sourced software licensed under the MIT license.
By Mark Hesketh, a web developer from Manchester, UK.
- Blog: markhesketh.co.uk
- Twitter: twitter.com/markahesketh
- GitHub: github.com/markahesketh
- Email: [email protected]