Ansible Role for managing an opiniated Alpine Router
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Simon Cornet 03f4f65f7c
All checks were successful
ci/woodpecker/push/linting Pipeline was successful
fix: exclude only sops yml files from lint
2026-07-14 16:23:57 +02:00
.woodpecker chore(package): update cr.simoncor.net/dockerhub/davidanson/markdownlint-cli2 docker tag to v0.23.0 2026-07-01 07:33:19 +00:00
defaults feat: add external dhcp option 2026-03-02 13:15:05 +01:00
handlers feat: remove static routes 2026-02-17 18:09:55 +01:00
meta chore: fix galaxy meta information 2026-02-16 14:50:40 +01:00
roles ci: migrate from gitlab ci to woodpecker 2026-05-15 14:13:51 +02:00
tasks feat: remove static routes 2026-02-17 18:09:55 +01:00
templates feat: add external dhcp option 2026-03-02 13:15:05 +01:00
.ansible-lint fix: exclude only sops yml files from lint 2026-07-14 16:23:57 +02:00
.editorconfig chore: add .editorconfig and .gitattributes 2026-05-27 14:24:02 +02:00
.gitattributes chore: add .editorconfig and .gitattributes 2026-05-27 14:24:02 +02:00
.gitignore chore: add basic role layout for ans-router 2026-02-16 14:15:02 +01:00
.markdownlint-cli2.jsonc ci: migrate from gitlab ci to woodpecker 2026-05-15 14:13:51 +02:00
.sops.yaml fix: correct sops regex to ya?ml 2026-07-14 16:02:04 +02:00
.yamllint chore: exclude .yml files from lint configs 2026-07-14 16:17:40 +02:00
AGENTS.md chore: restructure tasks - install, routing, firewall, performance 2026-02-16 14:17:09 +01:00
ansible.cfg chore: sync linting and config files from common 2026-07-14 11:33:15 +02:00
playbook.yaml ci: add various configs and linter fixes 2026-02-16 17:51:23 +01:00
readme.md ci: migrate from gitlab ci to woodpecker 2026-05-15 14:13:51 +02:00
renovate.json chore: add basic role layout for ans-router 2026-02-16 14:15:02 +01:00

Ansible Role: Router

Configure router functionality with NAT, firewall, and routing on Alpine Linux.

Variables

Network Interfaces

Variable Required Default Description
wan_interface Yes eth0 WAN network interface
lan_interface Yes eth1 LAN network interface

Firewall Rules

Variable Required Default Description
incoming_firewall_rules No [] List of incoming firewall rules

NAT Configuration

Variable Required Default Description
nat_port_forwards No [] List of NAT port forwarding rules

Tags

Tag Description
full Execute all tasks
routing Configure routing and iptables
firewall Configure firewall rules
performance Configure performance tuning

Example

wan_interface: "eth0"
lan_interface: "eth1"

incoming_firewall_rules:
  - name: "allow ssh from lan"
    source: "192.168.1.0/24"
    protocol: "tcp"
    port: 22
  - name: "allow dns from lan"
    source: "192.168.1.0/24"
    protocol: "udp"
    port: 53

nat_port_forwards:
  - name: "forward https to web server"
    dst: "192.168.1.10"
    port: 443
    protocol: "tcp"