fix(wsl2): Fix all errors in wsl env

This commit is contained in:
Alejandro Roman committed 2026-03-29 16:59:33 +04:00
1 parent a8c153773b
commit ba2dce8094
5 files changed
+53 -4

No files matched your search

+12
View File
@@ -3,6 +3,18 @@
- name: "Disable SMTP to avoid port conflicts"
include_tasks: "{{ [playbook_dir, 'roles/sys-svc-mail-smtp/tasks/disable.yml' ] | path_join }}"
- name: Ensure Mailu unbound overrides directory exists
file:
path: "{{ MAILU_UNBOUND_CONF_FILE | dirname }}"
state: directory
mode: "0755"
- name: Render Mailu unbound config override
template:
src: unbound.conf.j2
dest: "{{ MAILU_UNBOUND_CONF_FILE }}"
mode: "0644"
- name: Ensure Rspamd overrides directory exists (host)
file:
path: "{{ MAILU_RSPAMD_HOST_DIR }}"
@@ -2,7 +2,7 @@
- name: "Fetch existing API tokens via curl inside admin container"
command: >-
{{ BIN_COMPOSE }} exec -T admin \
curl -sS -X GET {{ MAILU_API_SERVICE_BASE_URL }}/token \
curl -sS --fail -X GET {{ MAILU_API_SERVICE_BASE_URL }}/token \
-H "Authorization: Bearer {{ MAILU_API_TOKEN }}"
args:
chdir: "{{ MAILU_DOCKER_DIR }}"
@@ -11,14 +11,13 @@
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
retries: 30
delay: 2
until: mailu_tokens_cli.rc == 0 and mailu_tokens_cli.stdout | length > 0
until: mailu_tokens_cli.rc == 0 and mailu_tokens_cli.stdout | trim | length > 0
- name: "Extract existing token info for '{{ mailu_user_key }};{{ mailu_user_name }}'"
set_fact:
mailu_user_existing_token: >-
{{ (
mailu_tokens_cli.stdout
| default('[]')
| from_json
| selectattr('comment','equalto', mailu_token_name)
| list
@@ -6,6 +6,8 @@
image: {{ MAILU_DOCKER_FLAVOR }}/unbound:{{ MAILU_VERSION }}
container_name: {{ MAILU_CONTAINER }}_resolver
{% include 'roles/sys-svc-container/templates/base.yml.j2' %}
volumes:
- "{{ MAILU_UNBOUND_CONF_FILE }}:/unbound.conf:ro"
{% include 'roles/sys-svc-container/templates/networks.yml.j2' %}
ipv4_address: {{ MAILU_DNS_RESOLVER }}
@@ -0,0 +1,35 @@
server:
verbosity: 1
interface: 0.0.0.0
{% raw %}{{- ' interface: ::0' if SUBNET6 }}
{% endraw %}
logfile: ""
do-ip4: yes
do-ip6: {% raw %}{{ 'yes' if SUBNET6 else 'no' }}{% endraw %}
do-udp: yes
do-tcp: yes
do-daemonize: no
access-control: {% raw %}{{ SUBNET }}{% endraw %} allow
{% raw %}{%- if SUBNET6 %}
access-control: {{ SUBNET6 }} allow
{%- endif %}{% endraw %}
directory: "/etc/unbound"
username: unbound
auto-trust-anchor-file: trusted-key.key
root-hints: "/etc/unbound/root.hints"
hide-identity: yes
hide-version: yes
cache-min-ttl: 300
{% if DOCKER_IN_CONTAINER | bool %}
forward-zone:
name: "."
forward-addr: 1.1.1.1
forward-addr: 8.8.8.8
{% endif %}
remote-control:
control-enable: yes
control-interface: /run/unbound.control.sock
+2 -1
View File
@@ -15,7 +15,7 @@ MAILU_OVERRIDES_DIR: "{{ [ MAILU_VOLUMES_DIR, 'overrides' ] | p
## Meta
MAILU_WEBSITE: "{{ lookup('tls', application_id, 'url.base') }}"
MAILU_API_SERVICE_BASE_URL: "http://{{ MAILU_FRONT_SERVICE }}/api/v1"
MAILU_API_SERVICE_BASE_URL: "http://localhost:8080/api/v1"
## Domains
MAILU_DOMAIN: "{{ lookup('config', application_id, 'domain') }}"
@@ -64,6 +64,7 @@ MAILU_DKIM_KEY_FILE: "{{ MAILU_DOMAIN }}.dkim.key"
MAILU_DKIM_KEY_PATH: "/dkim/{{ MAILU_DKIM_KEY_FILE }}"
## Rspamd
MAILU_UNBOUND_CONF_FILE: "{{ [ MAILU_OVERRIDES_DIR, 'unbound/unbound.conf' ] | path_join }}"
MAILU_RSPAMD_HOST_DIR: "{{ [ MAILU_OVERRIDES_DIR, 'rspamd' ] | path_join }}"
MAILU_RSPAMD_HOST_FILE: "{{ [ MAILU_RSPAMD_HOST_DIR,'ratelimit.conf' ] | path_join }}"
MAILU_RSPAMD_LIMITS_DEFAULTS: