summaryrefslogtreecommitdiff
path: root/roles/hysteria/tasks/setup_hysteria.yaml
diff options
context:
space:
mode:
authorrepliqa <sarzilhossain@proton.me>2025-07-23 14:06:15 +0600
committerrepliqa <sarzilhossain@proton.me>2025-07-23 14:06:15 +0600
commit69acb7a82a68eeb439e55b994281056df52c81b1 (patch)
tree7c6a53694e11511a3014470c213255a503f9c95e /roles/hysteria/tasks/setup_hysteria.yaml
v0.0.1alphaHEADmain
Diffstat (limited to 'roles/hysteria/tasks/setup_hysteria.yaml')
-rw-r--r--roles/hysteria/tasks/setup_hysteria.yaml17
1 files changed, 17 insertions, 0 deletions
diff --git a/roles/hysteria/tasks/setup_hysteria.yaml b/roles/hysteria/tasks/setup_hysteria.yaml
new file mode 100644
index 00000000..64161b43
--- /dev/null
+++ b/roles/hysteria/tasks/setup_hysteria.yaml
@@ -0,0 +1,17 @@
+---
+- name: "create certificate dir"
+ ansible.builtin.file:
+ path: /var/reactance/ocserv/certs/
+ state: directory
+ owner: _vpn
+ group: _vpn
+
+- name: "generate server certs and key"
+ ansible.builtin.shell: "openssl req -x509 -newkey rsa:4096 -keyout /var/reactance/hysteria/certs/server-key.pem -out /var/reactance/hysteria/certs/server-cert.pem -sha256 -days 3650 -nodes -subj '/CN=JohnDane'"
+
+- name: "template out ocserv config"
+ ansible.builtin.template:
+ src: ocserv.conf.j2
+ dest: /var/reactance/ocserv/ocserv.conf
+ notify:
+ - hysteria_start