diff --git a/tasks/apt.yml b/tasks/apt.yml
index 2b00eded6603d0a8d7fc5e7019b6af4caae9ba7c..b197ffeb4a138c73223b7675a7698cbf9f15707c 100644
--- a/tasks/apt.yml
+++ b/tasks/apt.yml
@@ -73,7 +73,7 @@
         group: root
       register: php_preferences
 
-    - name: Update apt cache
+    - name: Update apt cache  # noqa: no-handler
       ansible.builtin.apt:
         update_cache: true
         cache_valid_time: 60
@@ -102,7 +102,7 @@
         label: "{{ path | basename }}"
       register: php_repo_absent
 
-    - name: Update apt cache
+    - name: Update apt cache  # noqa: no-handler
       ansible.builtin.apt:
         update_cache: true
         cache_valid_time: 60
diff --git a/tasks/check_init.yml b/tasks/check_init.yml
index 200ffe8af0dc6cb1da35a8d16990c8225d09a54b..5d67b977396876186c95cd25426dc26fbf99de86 100644
--- a/tasks/check_init.yml
+++ b/tasks/check_init.yml
@@ -32,7 +32,7 @@
     - name: Debug the ini system
       ansible.builtin.debug:
         var: php_init
-      verbosity: "{% if ansible_check_mode | bool %}0{% else %}1{% endif %}"
+        verbosity: "{% if ansible_check_mode | bool %}0{% else %}1{% endif %}"
 
   tags:
     - php
diff --git a/tasks/file_edited.yml b/tasks/file_edited.yml
index 264bf96aab255e831e66a7bba7d409c446b370c8..71be6394c2e2042d6004e75b1d52fa13ffbcf97b 100644
--- a/tasks/file_edited.yml
+++ b/tasks/file_edited.yml
@@ -159,6 +159,7 @@
             state: reloaded
 
       when:
+        - php_init is defined
         - php_init == "systemd"
         - php_conf_file_version in php_ver_installed
         - php_conf_file_changed | bool
diff --git a/tasks/file_section_edited.yml b/tasks/file_section_edited.yml
index 85ecd71e820894f0009d19205b425217eb7cbd6e..5db5fcd2718d160ecc8e97ae6068a8b0fc302c1b 100644
--- a/tasks/file_section_edited.yml
+++ b/tasks/file_section_edited.yml
@@ -64,7 +64,7 @@
         loop_var: php_conf_variable_pair
       register: php_conf_file_edited
 
-    - name: Set a fact to indicate that the file has changed
+    - name: Set a fact to indicate that the file has changed  # noqa: no-handler
       ansible.builtin.set_fact:
         php_conf_file_changed: true
       when: (php_conf_file_comments_edited.changed ) or ( php_conf_file_edited.changed | bool )
diff --git a/tasks/file_templated.yml b/tasks/file_templated.yml
index 96f26776286c84814ee4ca0ad48bf3af82a0f6e5..d09457323a04eea0648d5c2c944e071f8c76332f 100644
--- a/tasks/file_templated.yml
+++ b/tasks/file_templated.yml
@@ -113,6 +113,7 @@
             state: reloaded
 
       when:
+        - php_init is defined
         - php_init == "systemd"
         - php_conf_file_version is defined
         - php_conf_file_version in php_ver_installed
@@ -121,7 +122,7 @@
         - php_conf_file_sapi is defined
         - php_conf_file_sapi == "fpm"
 
-    - name: File backup absent when the PHP configuration file is unchanged
+    - name: File backup absent when the PHP configuration file is unchanged  # noqa: no-handler
       ansible.builtin.file:
         path: "{{ php_conf_file_backup }}"
         state: absent