diff --git a/tasks/check_vars.yml b/tasks/check_vars.yml
index a2085ca6bac0acd65a9fce93d851770393e7a2b6..faff6b70fa620056faf8adddd9a2fa763f13d851 100644
--- a/tasks/check_vars.yml
+++ b/tasks/check_vars.yml
@@ -181,11 +181,14 @@
         verbosity: "{% if ansible_check_mode | bool or ansible_diff_mode | bool %}1{% else %}2{% endif %}"
 
     # https://github.com/composer/composer/issues/12153#issuecomment-2419452358
-    - name: Check that the opcache.jit_buffer_size is set to 0 or is >= 40961
+    - name: Check that the opcache.jit_buffer_size is set to 0 or >= 40961 or >= 1K or >= 1M or >= 1G
       ansible.builtin.assert:
         that:
-          - php_conf_opcache_jit_buffer_size is ansible.builtin.regex('^[0-9]{1,20}$')
-          - ( php_conf_opcache_jit_buffer_size == "0" ) or ( php_conf_opcache_jit_buffer_size >= "40961" )
+          - php_conf_opcache_jit_buffer_size is ansible.builtin.regex('^[0-9]{1,20}[G|K|M]?$')
+          - >-
+            ( php_conf_opcache_jit_buffer_size == "0" ) or
+            ( ( php_conf_opcache_jit_buffer_size is ansible.builtin.regex('^[0-9]{1,20}$') ) and ( php_conf_opcache_jit_buffer_size | int >= 40961 ) ) or
+            ( php_conf_opcache_jit_buffer_size is ansible.builtin.regex('^[1-9][0-9]{0,20}[G|K|M]$') )
         quiet: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}"
       loop: "{{ php_conf_opcache_jit_buffer_sizes }}"
       loop_control: