Skip to content
Snippets Groups Projects
Commit 066eded4 authored by alexandr.benzonan's avatar alexandr.benzonan
Browse files

auto start iface + add variables for gateway

parent df6d3795
No related branches found
No related tags found
No related merge requests found
auto {{ifname}}
iface {{ifname}} inet static
address {{ip}}
netmask {{netmask}}
......@@ -7,12 +8,14 @@ iface {{ifname}} inet static
{% endif %}
{% if type == "router" %}
auto {{ifname2}}
iface {{ifname2}} inet static
address {{ip2}}
netmask {{netmask}}
{% if inventory_hostname == "R1" %}
post-up ip route add 3.0.0.0/24 nexthop via 2.0.0.2
post-up ip route add 3.0.0.0/24 nexthop via {{gateway}}
{% else %}
post-up ip route add 1.0.0.0/24 nexthop via 2.0.0.1
post-up ip route add 1.0.0.0/24 nexthop via {{gateway}}
{% endif %}
{% endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment