blob: 58589270576d4b2224188b3e525b495690521f20 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
---
- name: initial
hosts: all
gather_facts: false
tasks:
- name: "set facts"
ansible.builtin.set_fact:
ansible_host: "{{ host }}"
ansible_port: "{{ port|default(22) }}"
ansible_user: "root"
ansible_ssh_private_key_file: "{{ private_key_file | default('.ssh_private_key') }}"
changed_when: false
throttle: 1
- name: bootstrap
ansible.builtin.raw: which python3 || pkg_add python3 || apk add python3 || apt install python3
when: bootstrap|default(true)
changed_when: false
throttle: 1
- name: gather facts
ansible.builtin.setup:
throttle: 1
tags:
- base
- web
- dns
- xray
- ocserv
- sshvpn
- hysteria
- name: "openbsd : apply base role to all"
hosts: all
roles:
- role: base
tags:
- base
- name: "openbsd : setup ocserv"
hosts: ocserv, all_vpns
roles:
- role: ocserv
tags:
- ocserv
- name: "openbsd : setup xray vpn"
hosts: vless, vmess, trojan, all_vpns
roles:
- role: xray
tags:
- xray
- name: "openbsd : setup sshvpn"
hosts: sshvpn, all_vpns
roles:
- role: sshvpn
tags:
- sshvpn
- name: "openbsd : setup sshvpn"
hosts: hysteria, all_vpns
roles:
- role: hysteria
tags:
- hysteria
- name: "openbsd : setup dns resolver with adblock and web interface"
hosts: all
roles:
- role: dns
tags:
- dns
- name: "openbsd : setup web interface for vpn clients"
hosts: all
roles:
- role: web
tags:
- web
|