Commit 580f00b8 authored by nanahira's avatar nanahira

finish gateway

parent d487d863
......@@ -32,12 +32,10 @@ protocol kernel {
{% for plan in routePlans %}
ipv4 table {{plan.name}};
protocol static {
ipv4 {
table {{plan.name}};
};
igp table master4;
route 0.0.0.0/0 recursive {{plan.addresses[0]}};
protocol pipe {
table master4;
peer table {{plan.name}};
export where ospf_router_id ~ {{plan.addressesString}};
}
protocol kernel {
ipv4 {
......
......@@ -118,6 +118,9 @@ class InventoryBuilder {
return vars;
}
getRoutePlanAddressesString(addresses: string[]) {
return `[ ${addresses.join(", ")} ]`;
}
async host_vars(host) {
const connections = [];
host.dockerServices = {
......@@ -157,7 +160,8 @@ class InventoryBuilder {
routePlans.push({
name: h.replace(/-/g, "_"),
destMark: this.hosts[h].destMark,
addresses: [this.hosts[h].address]
addresses: [this.hosts[h].address],
addressesString: this.getRoutePlanAddressesString([this.hosts[h].address])
});
}
}
......
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