mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-24 11:06:24 +02:00
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:
@@ -43,8 +43,8 @@ WEBSERVER_CPUS_EFFECTIVE: >-
|
||||
# - else → floor to int
|
||||
WEBSERVER_WORKER_PROCESSES: >-
|
||||
{{
|
||||
1 if WEBSERVER_CPUS_EFFECTIVE < 1
|
||||
else (WEBSERVER_CPUS_EFFECTIVE | int)
|
||||
1 if (WEBSERVER_CPUS_EFFECTIVE | float) < 1
|
||||
else (WEBSERVER_CPUS_EFFECTIVE | float | int)
|
||||
}}
|
||||
|
||||
# worker_connections from pids_limit (use the smaller one), with correct key/defaults
|
||||
|
Reference in New Issue
Block a user