bird: add radv
This commit is contained in:
parent
2e4d0e6fb0
commit
ff3abbc5d3
|
@ -3,15 +3,17 @@ base:
|
||||||
- hosts
|
- hosts
|
||||||
- subnets
|
- subnets
|
||||||
- vlans
|
- vlans
|
||||||
- bird.ospf
|
|
||||||
'priv*-gw':
|
'priv*-gw':
|
||||||
- dhcp
|
- dhcp
|
||||||
|
- bird.radv
|
||||||
- bird.ospf
|
- bird.ospf
|
||||||
'pub-gw':
|
'pub-gw':
|
||||||
- dhcp
|
- dhcp
|
||||||
|
- bird.radv
|
||||||
- bird.ospf
|
- bird.ospf
|
||||||
'serv-gw':
|
'serv-gw':
|
||||||
- dhcp
|
- dhcp
|
||||||
|
- bird.radv
|
||||||
- bird.ospf
|
- bird.ospf
|
||||||
'c3d2-gw or c3d2-anon':
|
'c3d2-gw or c3d2-anon':
|
||||||
- bird.ospf
|
- bird.ospf
|
||||||
|
|
|
@ -10,6 +10,31 @@ protocol device {
|
||||||
scan time 10;
|
scan time 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{%- set radv_ifaces = pillar.get('radv') and pillar['radv'].get(salt['grains.get']('id')) %}
|
||||||
|
{%- if radv_ifaces %}
|
||||||
|
protocol radv {
|
||||||
|
{%- for iface, conf in radv_ifaces.items() %}
|
||||||
|
interface "{{ iface }}" {
|
||||||
|
{%- if conf.get('rdnss') %}
|
||||||
|
{%- for value in conf['rdnss'] %}
|
||||||
|
{%- set host = value.split('.')[0] %}
|
||||||
|
{%- set net = value.split('.')[1] %}
|
||||||
|
rdnss {{ pillar['hosts-inet6'][net][host] }};
|
||||||
|
{%- endfor %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if conf.get('dnssl') %}
|
||||||
|
dnssl {
|
||||||
|
{%- for value in conf['dnssl'] %}
|
||||||
|
domain "{{ value }}";
|
||||||
|
{%- endfor %}
|
||||||
|
};
|
||||||
|
{%- endif %}
|
||||||
|
};
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
|
}
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
protocol ospf ZW6 {
|
protocol ospf ZW6 {
|
||||||
area 0 {
|
area 0 {
|
||||||
networks {
|
networks {
|
||||||
|
|
Loading…
Reference in New Issue