summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se (leap communications)>2019-07-16 17:23:39 +0200
committerKali Kaneko <kali@leap.se (leap communications)>2019-07-16 17:23:39 +0200
commitec98da8015aae7715b412b1a97101d989d5ea682 (patch)
tree720a0a66463cdb57a757827683e0cff56ee4c4c9 /scripts
parentd03e9b4755b704fe0b530c0156e439a1ba47d803 (diff)
render valid json
Diffstat (limited to 'scripts')
-rw-r--r--scripts/templates/eip-service.json22
1 files changed, 11 insertions, 11 deletions
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) }}
}