feat: add incoming fw rules, fixed routes and improved docs

This commit is contained in:
Simon Cornet 2026-02-17 08:44:28 +01:00
commit c1aafd19c1
4 changed files with 87 additions and 4 deletions

View file

@ -7,12 +7,10 @@
state: "restarted"
# apply local routes
- name: "apply routes"
- name: "apply routes - add static routes"
ansible.builtin.shell:
cmd: |
{% for route in static_routes %}
ip route replace {{ route.destination }} via {{ route.gateway }}
{% if route.interface is defined %}dev {{ route.interface }}{% endif %}
ip route replace {{ route.destination }} via {{ route.gateway }}{{ ' dev ' + route.interface if route.interface is defined else '' }}{{ ' metric ' + route.metric if route.metric is defined else '' }}
{% endfor %}
when: "static_routes | length > 0"
changed_when: false