ci: add various configs and linter fixes

This commit is contained in:
Simon Cornet 2026-02-16 17:51:23 +01:00
commit b92f2c6175
5 changed files with 18 additions and 6 deletions

View file

@ -43,14 +43,13 @@
block: |
{% for route in static_routes %}
# {{ route.name }}
{% if route.metric is defined %}
{% if route.metric is defined %}
down ip route del {{ route.destination }} via {{ route.gateway }}{{ ' dev ' + route.interface if route.interface is defined else '' }} metric {{ route.metric }}
up ip route add {{ route.destination }} via {{ route.gateway }}{{ ' dev ' + route.interface if route.interface is defined else '' }} metric {{ route.metric }}
{% else %}
{% else %}
down ip route del {{ route.destination }} via {{ route.gateway }}{{ ' dev ' + route.interface if route.interface is defined else '' }}
up ip route add {{ route.destination }} via {{ route.gateway }}{{ ' dev ' + route.interface if route.interface is defined else '' }}
{% endif %}
{% endif %}
{% endfor %}
insertafter: "^iface {{ lan_interface }} inet.*\\n(\\s+.*\\n)*\\s+netmask"
state: "{{ 'present' if static_routes | length > 0 else 'absent' }}"