diff --git a/tasks/checks.yml b/tasks/checks.yml
index ee6eec0cc73c3a4ccb9da72aebcd5d4ccbfd5047..3a8bc1b297a9ae12db0687ed55ce3145c0629bd2 100644
--- a/tasks/checks.yml
+++ b/tasks/checks.yml
@@ -224,7 +224,7 @@
               - "apache_phpfpm_conf: {{ apache_phpfpm_conf }}"
             verbosity: "{% if ansible_check_mode | bool %}0{% else %}1{% endif %}"
 
-      when: ( apache_php is defined ) and ( apache_php )
+      when: ( apache_php is defined ) and ( apache_php | bool )
 
     - name: Debug the enabled MPM
       ansible.builtin.debug: