initial commit
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
commit
75891c3271
129 changed files with 8046 additions and 0 deletions
7
roles/tuwunel/defaults/main.yml
Normal file
7
roles/tuwunel/defaults/main.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
# Port (internal to docker network)
|
||||
tuwunel_port: 6167
|
||||
|
||||
# Trusted Matrix servers for federation
|
||||
tuwunel_trusted_servers:
|
||||
- matrix.org
|
||||
6
roles/tuwunel/handlers/main.yml
Normal file
6
roles/tuwunel/handlers/main.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
- name: Restart tuwunel
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: /srv/tuwunel
|
||||
state: restarted
|
||||
build: never
|
||||
30
roles/tuwunel/tasks/main.yml
Normal file
30
roles/tuwunel/tasks/main.yml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
- name: Create Tuwunel directories
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
loop:
|
||||
- /srv/tuwunel
|
||||
- /srv/tuwunel/data
|
||||
|
||||
- name: Deploy Tuwunel configuration
|
||||
ansible.builtin.template:
|
||||
src: tuwunel.toml.j2
|
||||
dest: /srv/tuwunel/tuwunel.toml
|
||||
mode: '0644'
|
||||
notify: Restart tuwunel
|
||||
|
||||
- name: Deploy Tuwunel docker-compose file
|
||||
ansible.builtin.template:
|
||||
src: compose.yml.j2
|
||||
dest: /srv/tuwunel/compose.yml
|
||||
mode: '0644'
|
||||
notify: Restart tuwunel
|
||||
|
||||
- name: Start Tuwunel service
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: /srv/tuwunel
|
||||
state: present
|
||||
build: never
|
||||
register: tuwunel_output
|
||||
16
roles/tuwunel/templates/compose.yml.j2
Normal file
16
roles/tuwunel/templates/compose.yml.j2
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
services:
|
||||
tuwunel:
|
||||
image: ghcr.io/matrix-construct/tuwunel:{{ tuwunel_version }}
|
||||
container_name: tuwunel
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
TUWUNEL_CONFIG: /etc/tuwunel.toml
|
||||
volumes:
|
||||
- /srv/tuwunel/data:/var/lib/tuwunel
|
||||
- /srv/tuwunel/tuwunel.toml:/etc/tuwunel.toml:ro
|
||||
networks:
|
||||
- tuwunel
|
||||
|
||||
networks:
|
||||
tuwunel:
|
||||
external: true
|
||||
10
roles/tuwunel/templates/tuwunel.toml.j2
Normal file
10
roles/tuwunel/templates/tuwunel.toml.j2
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[global]
|
||||
server_name = "{{ tuwunel_server_name }}"
|
||||
database_path = "/var/lib/tuwunel"
|
||||
port = {{ tuwunel_port }}
|
||||
address = "0.0.0.0"
|
||||
allow_registration = true
|
||||
registration_token = "{{ tuwunel_registration_token }}"
|
||||
allow_federation = true
|
||||
trusted_servers = {{ tuwunel_trusted_servers | to_json }}
|
||||
max_request_size = 20000000
|
||||
Loading…
Add table
Add a link
Reference in a new issue