feat: add incoming fw rules, fixed routes and improved docs
This commit is contained in:
parent
b92f2c6175
commit
c1aafd19c1
4 changed files with 87 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue