aboutsummaryrefslogtreecommitdiffstats
path: root/roles/wireguard/tasks/synchronize.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/wireguard/tasks/synchronize.yml')
-rw-r--r--roles/wireguard/tasks/synchronize.yml21
1 files changed, 21 insertions, 0 deletions
diff --git a/roles/wireguard/tasks/synchronize.yml b/roles/wireguard/tasks/synchronize.yml
new file mode 100644
index 0000000..0e7574a
--- /dev/null
+++ b/roles/wireguard/tasks/synchronize.yml
@@ -0,0 +1,21 @@
+
+# wireguard ~~ roles/wireguard/tasks/main.yml
+# create keys and configuration for wireguard hosts
+
+---
+
+- name: ensure wireguard directory exists on remote
+ file:
+ path: /etc/wireguard
+ owner: "0"
+ group: "0"
+ mode: "0700"
+ state: directory
+
+- name: ensure wiregard configuration is copied on remote
+ copy:
+ src: "{{ wg_host_conf }}"
+ dest: "/etc/wireguard/{{ global.dcontroller }}.conf"
+ owner: "0"
+ group: "0"
+ mode: "0600"
remember that computers suck.