ci: add various configs and linter fixes
This commit is contained in:
parent
18bee6f198
commit
b92f2c6175
5 changed files with 18 additions and 6 deletions
|
|
@ -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' }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue