Fix YAML?
diff --git a/xos/observers/vpn/steps/sync_vpntenant.py b/xos/observers/vpn/steps/sync_vpntenant.py
index 0ce7ab0..0cd2ef2 100644
--- a/xos/observers/vpn/steps/sync_vpntenant.py
+++ b/xos/observers/vpn/steps/sync_vpntenant.py
@@ -27,4 +27,4 @@
return objs
def get_extra_attributes(self, o):
- return {"server_key": o.server_key}
+ return {"server_key": o.server_key.splitlines()}
diff --git a/xos/observers/vpn/steps/sync_vpntenant.yaml b/xos/observers/vpn/steps/sync_vpntenant.yaml
index 1814593..e97245f 100644
--- a/xos/observers/vpn/steps/sync_vpntenant.yaml
+++ b/xos/observers/vpn/steps/sync_vpntenant.yaml
@@ -9,9 +9,9 @@
apt: name=openvpn state=present update_cache=yes
- name: write key
- shell:
- |
- printf "{{ server_key }}" > "/opt/xos/observers/vpn/static.key"
+ shell: printf "" > "static.key"
+ shell: printf "{{ item }}" >> "static.key"
+ with_items: "{{ server_key }}"
- name: write config
shell: printf "dev tun\nifconfig 10.8.0.1 10.8.0.2\nsecret /opt/xos/observers/vpn/static.key\nkeepalive 10 60\nping-timer-rem\npersist-tun\npersist-key" > "/opt/xos/observers/vpn/server.conf"