diff options
Diffstat (limited to 'provider_base')
-rw-r--r-- | provider_base/files/service-definitions/v1/eip-service.json.erb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/provider_base/files/service-definitions/v1/eip-service.json.erb b/provider_base/files/service-definitions/v1/eip-service.json.erb index 0ecd002a..4bd220df 100644 --- a/provider_base/files/service-definitions/v1/eip-service.json.erb +++ b/provider_base/files/service-definitions/v1/eip-service.json.erb @@ -42,12 +42,14 @@ end configuration = node.openvpn.configuration end - configuration = configuration.dup - if configuration['fragment'] && configuration['fragment'] == 1500 - configuration.delete('fragment') + if gateways.any? + configuration = configuration.dup + if configuration['fragment'] && configuration['fragment'] == 1500 + configuration.delete('fragment') + end + hsh["gateways"] = gateways.compact + hsh["locations"] = locations + hsh["openvpn_configuration"] = configuration end - hsh["gateways"] = gateways.compact - hsh["locations"] = locations - hsh["openvpn_configuration"] = configuration JSON.sorted_generate hsh %>
\ No newline at end of file |