sync: Inventory-Realabgleich + neue host_vars/roles/playbooks
Nachgezogener Arbeitsstand des Homelabs: - neue host_vars (k3s-*, gluster-*, docmost, paperless, kometa, thelounge, satisfactory, wolfstack-vm) - neue Rollen/Playbooks (net_watchdog, patchmon-agent, tc_ratelimit, sops-age, rotate-ssh-key, dns-doh, remove-postfix, checkrr-deploy) - diverse Rollen-Updates (base, borg, dns_resolver, frp_client, hawser, nvidia) Ausgeklammert (bleiben uncommittet): host_vars/docmost/vars.yml (Klartext-Token -> sollte vault-konform via vault_* referenziert werden). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
d857b72cf8
commit
bc765668a6
52 changed files with 780 additions and 222 deletions
26
roles/tc_ratelimit/templates/tc-ratelimit.sh.j2
Normal file
26
roles/tc_ratelimit/templates/tc-ratelimit.sh.j2
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
# tc per-flow rate limit – deployed via Ansible
|
||||
# Jede TCP-Connection bekommt max {{ tc_flow_limit }}
|
||||
IFACE="{{ tc_iface }}"
|
||||
FLOW_LIMIT="{{ tc_flow_limit }}"
|
||||
TOTAL_LIMIT="{{ tc_total_limit }}"
|
||||
BURST="{{ tc_burst }}"
|
||||
|
||||
case "${1}" in
|
||||
start)
|
||||
tc qdisc del dev "${IFACE}" root 2>/dev/null
|
||||
tc qdisc add dev "${IFACE}" root handle 1: htb default 10
|
||||
tc class add dev "${IFACE}" parent 1: classid 1:1 htb rate "${TOTAL_LIMIT}" burst "${BURST}"
|
||||
tc class add dev "${IFACE}" parent 1:1 classid 1:10 htb rate "${TOTAL_LIMIT}" burst "${BURST}"
|
||||
tc qdisc add dev "${IFACE}" parent 1:10 handle 10: fq maxrate "${FLOW_LIMIT}" flow_limit 200
|
||||
echo "tc: ${FLOW_LIMIT}/flow on ${IFACE}"
|
||||
;;
|
||||
stop)
|
||||
tc qdisc del dev "${IFACE}" root 2>/dev/null
|
||||
;;
|
||||
status)
|
||||
tc -s qdisc show dev "${IFACE}"
|
||||
tc -s class show dev "${IFACE}"
|
||||
;;
|
||||
*) echo "Usage: $0 {start|stop|status}"; exit 1 ;;
|
||||
esac
|
||||
Loading…
Add table
Add a link
Reference in a new issue