summaryrefslogtreecommitdiff
path: root/roles/hysteria/tasks/setup_hysteria.yaml
blob: 64161b43dd2da73d2f2ad8638c2e50ef580e7894 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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