From ec98da8015aae7715b412b1a97101d989d5ea682 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 16 Jul 2019 17:23:39 +0200 Subject: render valid json --- scripts/templates/eip-service.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'scripts') diff --git a/scripts/templates/eip-service.json b/scripts/templates/eip-service.json index 8d1b0a1..18c7a07 100644 --- a/scripts/templates/eip-service.json +++ b/scripts/templates/eip-service.json @@ -3,11 +3,11 @@ "version": 3, "locations": { {% for loc in locations %} "{{loc}}": { - "name": "{{ locations[loc]["name"] }}", - "country_code": "{{ locations[loc]["country_code"] }}", - "hemisphere": "{{ locations[loc]["hemisphere"] }}", - "timezone": {{ locations[loc]["timezone"] }}, - },{% endfor %} + "name": "{{ locations[loc]['name'] }}", + "country_code": "{{ locations[loc]['country_code'] }}", + "hemisphere": "{{ locations[loc]['hemisphere'] }}", + "timezone": "{{ locations[loc]['timezone'] }}" + }{{ "," if not loop.last }}{% endfor %} }, "gateways": { {% for gw in gateways %} "{{gw}}": { @@ -20,13 +20,13 @@ "limited": false, "transport": [ {% for tr, proto, port, options in gateways[gw]["transports"] %} {"type": "{{ tr }}", - "protocols": ["{{ proto }}"], - "ports": [{{ port }}],{% if options %} + "protocols": ["{{ proto }}"],{% if options %} "options": {{ options | tojson }},{% endif %} - },{% endfor %} - ], - }, - },{% endfor %} + "ports": [{{ port }}] + }{{ "," if not loop.last }}{% endfor %} + ] + } + }{{ "," if not loop.last }}{% endfor %} }, "openvpn_configuration": {{ openvpn|tojson(indent=8) }} } -- cgit v1.2.3