Attempt to escape colons for ansible
diff --git a/xos/synchronizers/vpn/steps/sync_vpntenant.py b/xos/synchronizers/vpn/steps/sync_vpntenant.py
index 2da02d8..8509ff9 100644
--- a/xos/synchronizers/vpn/steps/sync_vpntenant.py
+++ b/xos/synchronizers/vpn/steps/sync_vpntenant.py
@@ -37,11 +37,18 @@
"vpn_subnet": tenant.vpn_subnet,
"server_network": tenant.server_network,
"clients_can_see_each_other": tenant.clients_can_see_each_other,
- "ca_crt": tenant.ca_crt,
+ "ca_crt": self.get_escaped_ca_crt(tenant),
"server_crt": tenant.server_crt,
"dh": tenant.dh
}
+ def get_escaped_ca_crt(self, tenant):
+ result = list()
+ for line in tenant.ca_crt:
+ result.append(line.replace(":", "\\\\u003a"))
+
+ return result
+
def create_client_script(self, tenant):
script = open("/opt/xos/core/static/vpn/" + str(tenant.script), 'w')
# write the configuration portion
diff --git a/xos/synchronizers/vpn/steps/sync_vpntenant.yaml b/xos/synchronizers/vpn/steps/sync_vpntenant.yaml
index 9de3c25..38f26e3 100644
--- a/xos/synchronizers/vpn/steps/sync_vpntenant.yaml
+++ b/xos/synchronizers/vpn/steps/sync_vpntenant.yaml
@@ -56,7 +56,7 @@
shell: rm -f auth.sh
- name: write auth script
- shell: "exit 0" > auth.sh
+ shell: echo "exit 0" > auth.sh
- name: write base config
shell: