diff --git a/roles/bird/defaults/main.yml b/roles/bird/defaults/main.yml index 2fa912c..68e90f2 100644 --- a/roles/bird/defaults/main.yml +++ b/roles/bird/defaults/main.yml @@ -1,5 +1,6 @@ --- bird__ospf_stub_interfaces: [] +bird__ospf_stub_networks: [] bird__ospf_broadcast_interfaces: {} bird__ospf_hello: 2 bird__ospf_retransmit: 5 diff --git a/roles/bird/templates/bird.conf.j2 b/roles/bird/templates/bird.conf.j2 index bcb13c6..94a8cf5 100644 --- a/roles/bird/templates/bird.conf.j2 +++ b/roles/bird/templates/bird.conf.j2 @@ -58,6 +58,9 @@ protocol ospf v2 ospf4 { }; area 0 { +{% for network in bird__ospf_stub_networks | ansible.utils.ipv4 %} + stubnet {{ network }}; +{% endfor %} {% for name, iface in bird__ospf_broadcast_interfaces.items() %} interface {{ name | enquote }} { type broadcast; @@ -86,6 +89,9 @@ protocol ospf v3 ospf6 { }; area 0 { +{% for network in bird__ospf_stub_networks | ansible.utils.ipv6 %} + stubnet {{ network }}; +{% endfor %} {% for name, iface in bird__ospf_broadcast_interfaces.items() %} interface {{ name | enquote }} { type broadcast;