Commit 3cc161a8 authored by nanahira's avatar nanahira

new

parent 8e03f7b2
version: '2.4'
services:
bird:
cap_add: [NET_ADMIN, NET_BROADCAST, NET_RAW]
image: git-registry.mycard.moe/nanahira/docker-bird
network_mode: host
restart: always
volumes: ['./templates/bird.conf:/etc/bird/bird.conf:ro']
log syslog all; log stderr all;
router id {{ansible_ssh_host}}; router id {{ansible_ssh_host}};
protocol device {} protocol device {}
{% for interface in interfaces %} {% for interface in sources %}
protocol direct { protocol direct {
ipv4; ipv4;
interface "{{interface}}"; interface "{{interface}}";
} }
{% endfor %} {% endfor %}
{% for subnet in staticRanges %}
protocol static {
ipv4;
route {{subnet}} via "lo";
}
{% endfor %}
protocol ospf v2 { protocol ospf v2 {
ipv4 { ipv4 {
import all; import all;
...@@ -20,13 +27,16 @@ protocol ospf v2 { ...@@ -20,13 +27,16 @@ protocol ospf v2 {
area 0 { area 0 {
networks { networks {
{% for subnet in networks %} {% for subnet in networks %}
{{subnet}};
{% endfor %} {% endfor %}
}; };
{% for interface in interfaces %} {% for interface in targets %}
interface "{{interface}}" { interface "{{interface}}" {
type broadcast; type broadcast;
cost 1; cost 1;
hello 5; hello 5;
authentication cryptographic;
password "{{ospfToken}}";
}; };
{% endfor %} {% endfor %}
}; };
......
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