-
Notifications
You must be signed in to change notification settings - Fork 5
/
gluetun.yml
76 lines (65 loc) · 2.44 KB
/
gluetun.yml
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
---
- hosts: homelab
vars:
application: gluetun
docker_network: "{{ networks.pub }}"
gluetun_servers:
-
city: sydney
ip: 246
-
city: perth
ip: 243
tasks:
- name: Create config folder
ansible.builtin.file:
path: "{{ config_directory }}"
state: directory
owner: "{{ common_user }}"
group: "{{ common_group }}"
mode: "0771"
- name: Copy config
ansible.builtin.template:
src: "{{ files_directory }}/{{ item.city }}.ovpn"
dest: "{{ config_directory }}/"
owner: "{{ common_root_id }}"
group: "{{ common_root_group }}"
mode: "0440"
loop: "{{ gluetun_servers }}"
- name: Create container
ansible.builtin.include_role:
name: docker_container
vars:
name: "{{ application }}-{{ item.city }}"
image: ghcr.io/qdm12/gluetun:v3.39.1
ipv4_address: "{{ docker_network.prefix }}.{{ item.ip }}"
capabilities:
- NET_ADMIN
volumes:
- "{{ config_directory }}:/gluetun"
env:
VPN_SERVICE_PROVIDER: custom
OPENVPN_USER: !vault |
$ANSIBLE_VAULT;1.1;AES256
62346339393763643733393830616139636137393164313733346137633565366434653131663930
6136623161323136396531373438386637663035323265660a333530316334663263646536616335
36363734363761613738626237653635316533313765386462616661356339653734396335633033
6536323665356134380a653764666636306433363463623137633636633236353034623837323066
37316165396464373335626166636238626532326563393264303266366436393632
OPENVPN_PASSWORD: !vault |
$ANSIBLE_VAULT;1.1;AES256
62393664336230376333623064666433343136356639643465643238333030396233366636376239
6234343761303133336562626164643265306361323337610a363031353463356230396138303964
35353939326231623063363937656637666434663863313134636337336434623561393133643435
6638306234303835350a616339333836376164653434303562313065383633633163646436623361
6434
OPENVPN_CUSTOM_CONFIG: "/gluetun/{{ item.city }}.ovpn"
HTTPPROXY: "on"
HTTPPROXY_STEALTH: "on"
DOT: "off"
BLOCK_MALICIOUS: "off"
BLOCK_SURVEILLANCE: "off"
BLOCK_ADS: "off"
UPDATER_PERIOD: "0"
TZ: "{{ common_timezone }}"
loop: "{{ gluetun_servers }}"