docs: standardize readme format

This commit is contained in:
Simon Cornet 2026-04-10 09:00:17 +02:00
commit 5e6551d87b

View file

@ -1,74 +1,56 @@
# Overview
# Ansible Role: Router
This role configures router functionality on Alpine Linux.
Configure router functionality with NAT, firewall, and routing on Alpine Linux.
## Supported Operating Systems
## Variables
| Operating System | Version |
| --- | ----- |
| Alpine | 3.23 |
### 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 | Purpose |
| --- | -------- |
| Tag | Description |
|-----|-------------|
| `full` | Execute all tasks |
| `routing` | Configure routing and iptables |
| `firewall` | Configure firewall rules |
| `performance` | Configure performance tuning |
## Role Variables
### Interfaces
## Example
```yaml
wan_interface: "eth0"
lan_interface: "eth1"
```
### Incoming Firewall Rules
```yaml
incoming_firewall_rules:
- name: "allow ssh from lan"
source: "192.168.1.0/24"
protocol: "tcp"
port: 22
- name: "allow https from lan"
source: "192.168.1.0/24"
protocol: "tcp"
port: 443
- name: "allow dns from lan"
source: "192.168.1.0/24"
protocol: "udp"
port: 53
- name: "allow ping from lan"
source: "192.168.1.0/24"
protocol: "icmp"
port: 0
```
### NAT Port Forwards
```yaml
nat_port_forwards:
- name: "forward http to web server"
dst: "192.168.1.10"
port: 80
protocol: "tcp"
- name: "forward https to web server"
dst: "192.168.1.10"
port: 443
protocol: "tcp"
- name: "forward ssh to internal server"
dst: "192.168.1.20"
port: 2222
protocol: "tcp"
```