initial commit

This commit is contained in:
pyrschtjag committed 2026-10-02 21:34:01 +04:00
commit 13eace9ce9
219 files changed
+6918

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
---
- name: restart stunnel4
ansible.builtin.service:
name: stunnel4
state: restarted
enabled: true
+32
View File
@@ -0,0 +1,32 @@
---
- name: install stunnel4
ansible.builtin.apt:
name: stunnel4
state: latest
update_cache: true
- name: ensure stunnel4 run directory exists
ansible.builtin.file:
path: /var/run/stunnel4
owner: stunnel4
group: stunnel4
state: directory
mode: "0755"
- name: ensure stunnel4 log directory exists
ansible.builtin.file:
path: /var/log/stunnel4
state: directory
owner: stunnel4
group: stunnel4
mode: "0755"
- name: deploy stunnel4 config
ansible.builtin.template:
src: "{{ item }}"
dest: "/etc/stunnel/{{ item | basename | regex_replace('\\.j2$', '') }}"
owner: root
group: root
mode: '0644'
loop: "{{ query('fileglob', role_path + '/templates/' + inventory_hostname + '/*.conf.j2') }}"
notify: restart stunnel4
@@ -0,0 +1,9 @@
setuid = stunnel4
setgid = stunnel4
pid = /var/run/stunnel4/absinthe.pid
output = /var/log/stunnel4/absinthe.log
[openvpn]
cert = /etc/letsencrypt/live/absinthe.oyacoi.ru/fullchain.pem
key = /etc/letsencrypt/live/absinthe.oyacoi.ru/privkey.pem
accept = 127.0.0.1:8444
connect = 127.0.0.1:1195
@@ -0,0 +1,9 @@
setuid = stunnel4
setgid = stunnel4
pid = /var/run/stunnel4/liqueur.pid
output = /var/log/stunnel4/liqueur.log
[openvpn]
cert = /etc/letsencrypt/live/liqueur.oyacoi.ru/fullchain.pem
key = /etc/letsencrypt/live/liqueur.oyacoi.ru/privkey.pem
accept = 127.0.0.1:8443
connect = 127.0.0.1:1194
@@ -0,0 +1,9 @@
setuid = stunnel4
setgid = stunnel4
pid = /var/run/stunnel4/absinthe.pid
output = /var/log/stunnel4/absinthe.log
client = yes
[openvpn]
sni = absinthe.oyacoi.ru
accept = 127.0.0.1:1195
connect = {{ hostvars['liqueur'].ip }}:443
@@ -0,0 +1,9 @@
setuid = stunnel4
setgid = stunnel4
pid = /var/run/stunnel4/liqueur.pid
output = /var/log/stunnel4/liqueur.log
client = yes
[openvpn]
sni = liqueur.oyacoi.ru
accept = 127.0.0.1:1194
connect = {{ hostvars['liqueur'].ip }}:443