Commit 3464d5df authored by nanahira's avatar nanahira

fix subnet

parent 37e529d9
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
debug 1 debug 1
# router-id 00:00:00:00:00:00:00:03 # router-id 00:00:00:00:00:00:00:03
redistribute local ip 10.198.0.0/24 redistribute local ip 10.198.0.0/24
{% for interface in lanInterfaces %} {% for subnet in localSubnets %}
redistribute if {{interface}} redistribute local ip {{subnet}}
{% endfor %} {% endfor %}
redistribute local deny redistribute local deny
reflect-kernel-metric true reflect-kernel-metric true
......
...@@ -171,6 +171,7 @@ class InventoryBuilder { ...@@ -171,6 +171,7 @@ class InventoryBuilder {
host.frpsNeeded = false; host.frpsNeeded = false;
const null_connection = '10000,null'; const null_connection = '10000,null';
const lanInterfaces = host.lanInterfaces; const lanInterfaces = host.lanInterfaces;
const localSubnets = host.subnets;
const masqInterfaces = host.masqInterfaces.length > 0 ? host.masqInterfaces.split(',') : []; const masqInterfaces = host.masqInterfaces.length > 0 ? host.masqInterfaces.split(',') : [];
const routePlans = []; const routePlans = [];
...@@ -219,6 +220,7 @@ class InventoryBuilder { ...@@ -219,6 +220,7 @@ class InventoryBuilder {
gateways: _.values(this.gateways[host.name]), gateways: _.values(this.gateways[host.name]),
connections, connections,
lanInterfaces, lanInterfaces,
localSubnets,
masqInterfaces, masqInterfaces,
dockerServices: host.dockerServices, dockerServices: host.dockerServices,
routePlans, routePlans,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment