diff --git a/templates/file-server/routers.json.j2 b/templates/file-server/routers.json.j2 index 764ee37..14831c8 100644 --- a/templates/file-server/routers.json.j2 +++ b/templates/file-server/routers.json.j2 @@ -3,12 +3,12 @@ {{ name | tojson }}: {{{ 'shortname': name, 'name': data['site_name'], - 'ip_addresses': [data['host_ip']], + 'ip_addresses': ([data['host_ip']] if 'host_ip' in data else []) + ([data['host_ipv6']] if 'host_ipv6' in data else []), 'prefix': data['default_prefix'], 'host': data['ansible_host'], - 'site': 'http://' + data['ansible_host'] + ':80/', - 'https': 'https://' + data['ansible_host'] + ':443/', + 'site': 'http://' ~ data['ansible_host'] ~ ':80/', + 'https': 'https://' ~ data['ansible_host'] ~ ':443/', 'neighbors': list(data['neighbors'].keys()), 'position': data['position'],