Browse Source

bird: Use role to denote if a machine is running an OPS-VPN endpoint.

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
Maximilian Wilhelm 3 years ago
parent
commit
1d0477df0d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      bird/IGP.conf

+ 2 - 1
bird/IGP.conf

@@ -3,6 +3,7 @@
 #
 
 {%- set node_config = salt['pillar.get']('nodes:' ~ grains['id'], {}) %}
+{%- set roles = node_config.get ('roles', []) %}
 {%- set ospf_node_config = node_config.get('ospf', {}) %}
 {%- if 'stub_router' in ospf_node_config and ospf_node_config['stub_router'] in [ True, 'yes'] %}
   {%- do ospf_node_config.update ({'stub_router': 'yes'}) %}
@@ -122,7 +123,7 @@ protocol ospf IGP {
 		};
 {%- endif %}
 
-{%- if grains['id'].startswith ('cr01') %}
+{%- if 'ops-vpn' in roles %}
 		interface "tun-ops" {
 			stub yes;
 		};