fix(webserver): ensure numeric casting for worker_processes and worker_connections

- Cast WEBSERVER_CPUS_EFFECTIVE to float before comparison to avoid
  'AnsibleUnsafeText < int' type errors.
- Ensure correct numeric coercion for pids_limit values.
- This prevents runtime templating errors when rendering nginx config.

Ref: https://chatgpt.com/share/68d3b047-56ac-800f-a73f-2fb144dbb7c4
This commit is contained in:
2025-09-24 10:48:23 +02:00
parent 929cddec0e
commit c181c7f6cd

View File

@@ -43,8 +43,8 @@ WEBSERVER_CPUS_EFFECTIVE: >-
# - else → floor to int # - else → floor to int
WEBSERVER_WORKER_PROCESSES: >- WEBSERVER_WORKER_PROCESSES: >-
{{ {{
1 if WEBSERVER_CPUS_EFFECTIVE < 1 1 if (WEBSERVER_CPUS_EFFECTIVE | float) < 1
else (WEBSERVER_CPUS_EFFECTIVE | int) else (WEBSERVER_CPUS_EFFECTIVE | float | int)
}} }}
# worker_connections from pids_limit (use the smaller one), with correct key/defaults # worker_connections from pids_limit (use the smaller one), with correct key/defaults