From 07a0b25a0908f4d2cfa42ffe817e020a5b608b01 Mon Sep 17 00:00:00 2001 From: Tobias Hachmer Date: Tue, 3 Oct 2017 21:24:36 +0200 Subject: [PATCH] Role service-radvd: make more parameters configurable --- inventory/group_vars/all | 8 ++++++++ roles/service-radvd/templates/radvd.conf.j2 | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/inventory/group_vars/all b/inventory/group_vars/all index d6edaf7..a577ed9 100644 --- a/inventory/group_vars/all +++ b/inventory/group_vars/all @@ -36,6 +36,10 @@ meshes: mm: 0 dat: 0 hop_penalty: 60 + radvd: + maxrtradvinterval: 900 + advvalidlifetime: 864000 + advpreferredlifetime: 172800 iface_mtu: 1350 peers_mesh_repo: https://github.com/freifunk-mwu/peers-ffmz.git peers_intragate_repo: https://github.com/freifunk-mwu/ffmz-infrastructure-peers.git @@ -68,6 +72,10 @@ meshes: mm: 0 dat: 0 hop_penalty: 60 + radvd: + maxrtradvinterval: 900 + advvalidlifetime: 864000 + advpreferredlifetime: 172800 iface_mtu: 1350 peers_mesh_repo: https://github.com/freifunk-mwu/peers-ffwi.git peers_intragate_repo: https://github.com/freifunk-mwu/ffwi-infrastructure-peers.git diff --git a/roles/service-radvd/templates/radvd.conf.j2 b/roles/service-radvd/templates/radvd.conf.j2 index 9fe390a..c8ee2d7 100644 --- a/roles/service-radvd/templates/radvd.conf.j2 +++ b/roles/service-radvd/templates/radvd.conf.j2 @@ -7,7 +7,7 @@ interface {{ mesh_id }}BR { AdvSendAdvert on; IgnoreIfMissing on; - MaxRtrAdvInterval 900; + MaxRtrAdvInterval {{ mesh_value.radvd.maxrtradvinterval }}; AdvLinkMTU {{ mesh_value.iface_mtu }}; {% for ip_type, ip_list in mesh_value.ipv6.iteritems() %} @@ -29,8 +29,8 @@ interface {{ mesh_id }}BR prefix {{ prefix | ipaddr('net') | ipsubnet(64, 0) | ipaddr('subnet') }} {% endif %} { - AdvValidLifetime 864000; - AdvPreferredLifetime 172800; + AdvValidLifetime {{ mesh_value.radvd.advvalidlifetime }}; + AdvPreferredLifetime {{ mesh_value.radvd.advpreferredlifetime }}; }; {% endfor %} {% if not loop.last %}