diff --git a/tests/dnsrecord/test_dnsrecord.yml b/tests/dnsrecord/test_dnsrecord.yml
index 176e5492516834a16718e1c0e9a78d2d6ed66b60..d13807f6c4c8f1e54dfd86de6fc98c93991f37ca 100644
--- a/tests/dnsrecord/test_dnsrecord.yml
+++ b/tests/dnsrecord/test_dnsrecord.yml
@@ -1549,11 +1549,8 @@
   - name: Cleanup test environment.
     include_tasks: env_cleanup.yml
 
-  - name: Remove certificate files.
-    shell:
-      cmd: rm -f "private{{ item }}.key" "cert{{ item }}.pem" "cert{{ item }}.der" "cert{{ item }}.b64"
+  - name: Remove certificate files.  # noqa: deprecated-command-syntax
+    ansible.builtin.shell: rm -f "private{{ item }}.key" "cert{{ item }}.pem" "cert{{ item }}.der" "cert{{ item }}.b64"
     with_items: [1]
     become: no
     delegate_to: localhost
-    args:
-      warn: no  # suppres warning for not using the `file` module.
diff --git a/tests/host/certificate/test_host_certificate.yml b/tests/host/certificate/test_host_certificate.yml
index 33d316d98cc37fc2932960ee7a0a0a6913cdcd95..b63578083f89c4005c79628e9db339d27d593df0 100644
--- a/tests/host/certificate/test_host_certificate.yml
+++ b/tests/host/certificate/test_host_certificate.yml
@@ -99,11 +99,9 @@
     register: result
     failed_when: result.changed or result.failed
 
-  - name: Remove certificate files.
+  - name: Remove certificate files.  # noqa: deprecated-command-syntax
     shell:
       cmd: rm -f "private{{ item }}.key" "cert{{ item }}.pem" "cert{{ item }}.der" "cert{{ item }}.b64"
     with_items: [1, 2, 3]
     become: no
     delegate_to: localhost
-    args:
-      warn: no  # suppres warning for not using the `file` module.
diff --git a/tests/host/certificate/test_hosts_certificate.yml b/tests/host/certificate/test_hosts_certificate.yml
index a55c898819adf4baae1093bfcc8dde90e8a5c7da..77f861c0bf7043cb52cb934aed0b19cf62fb787f 100644
--- a/tests/host/certificate/test_hosts_certificate.yml
+++ b/tests/host/certificate/test_hosts_certificate.yml
@@ -98,11 +98,9 @@
     register: result
     failed_when: not result.changed or result.failed
 
-  - name: Remove certificate files.
+  - name: Remove certificate files.  # noqa: deprecated-command-syntax
     shell:
       cmd: rm -f "private{{ item }}.key" "cert{{ item }}.pem" "cert{{ item }}.der" "cert{{ item }}.b64"
     with_items: [1, 2, 3]
     become: no
     delegate_to: localhost
-    args:
-      warn: no  # suppres warning for not using the `file` module.
diff --git a/tests/service/certificate/test_service_certificate.yml b/tests/service/certificate/test_service_certificate.yml
index a7fcbeb5d0f233636ab012be42148ee9ce1e3a96..bbac408bcba08efdd7e2a80971d5281e58fd6e31 100644
--- a/tests/service/certificate/test_service_certificate.yml
+++ b/tests/service/certificate/test_service_certificate.yml
@@ -214,11 +214,9 @@
       update_dns: yes
       state: absent
 
-  - name: Remove certificate files.
+  - name: Remove certificate files.  # noqa: deprecated-command-syntax
     shell:
       cmd: rm -f "private{{ item }}.key" "cert{{ item }}.pem" "cert{{ item }}.der" "cert{{ item }}.b64"
     with_items: [1, 2]
     become: no
     delegate_to: localhost
-    args:
-      warn: no  # suppres warning for not using the `file` module.
diff --git a/tests/service/test_service_disable.yml b/tests/service/test_service_disable.yml
index 292ad4e8de7db3b1c5490cc834c1980ea3e4c01e..822fb9faaf7830a5f9920e4a4596e7f85ea551be 100644
--- a/tests/service/test_service_disable.yml
+++ b/tests/service/test_service_disable.yml
@@ -100,11 +100,9 @@
   - name: Destroy Kerberos tickets.
     shell: kdestroy -A -q -c ${KRB5CCNAME}
 
-  - name: Remove certificate files.
+  - name: Remove certificate files.  # noqa: deprecated-command-syntax
     shell:
       cmd: rm -f "private{{ item }}.key" "cert{{ item }}.pem" "cert{{ item }}.der" "cert{{ item }}.b64"
     with_items: [1]
     become: no
     delegate_to: localhost
-    args:
-      warn: no  # suppres warning for not using the `file` module.
diff --git a/tests/user/certificate/test_user_certificate.yml b/tests/user/certificate/test_user_certificate.yml
index 5ea6fe90f371f8980a3a4c71dfb2cf55db9b4c17..09dacbb35e54e66aa1b3693dd8e7b06197e5128b 100644
--- a/tests/user/certificate/test_user_certificate.yml
+++ b/tests/user/certificate/test_user_certificate.yml
@@ -80,11 +80,9 @@
     register: result
     failed_when: not result.changed or result.failed
 
-  - name: Remove certificate files.
+  - name: Remove certificate files.  # noqa: deprecated-command-syntax
     shell:
       cmd: rm -f "private{{ item }}.key" "cert{{ item }}.pem" "cert{{ item }}.der" "cert{{ item }}.b64"
     with_items: [1, 2, 3]
     become: no
     delegate_to: localhost
-    args:
-      warn: no  # suppres warning for not using the `file` module.
diff --git a/tests/user/certificate/test_users_certificate.yml b/tests/user/certificate/test_users_certificate.yml
index 313a826f1c188b7a5c7155a17d76d98b2e891057..d649f848e6558862f68128f7da23d70949b1efc6 100644
--- a/tests/user/certificate/test_users_certificate.yml
+++ b/tests/user/certificate/test_users_certificate.yml
@@ -93,11 +93,9 @@
     register: result
     failed_when: not result.changed or result.failed
 
-  - name: Remove certificate files.
+  - name: Remove certificate files.  # noqa: deprecated-command-syntax
     shell:
       cmd: rm -f "private{{ item }}.key" "cert{{ item }}.pem" "cert{{ item }}.der" "cert{{ item }}.b64"
     with_items: [1, 2, 3]
     become: no
     delegate_to: localhost
-    args:
-      warn: no  # suppres warning for not using the `file` module.
diff --git a/tests/user/certmapdata/test_user_certmapdata.yml b/tests/user/certmapdata/test_user_certmapdata.yml
index 144d49f4266d3135898c72c7349a2873d124aefc..0257b23b4849e352155c88b5fe58adf049a66cba 100644
--- a/tests/user/certmapdata/test_user_certmapdata.yml
+++ b/tests/user/certmapdata/test_user_certmapdata.yml
@@ -225,11 +225,9 @@
     register: result
     failed_when: not result.changed or result.failed
 
-  - name: Remove certificate files.
+  - name: Remove certificate files.   # noqa: deprecated-command-syntax
     shell:
       cmd: rm -f "private{{ item }}.key" "cert{{ item }}.pem" "cert{{ item }}.der" "cert{{ item }}.b64"
     with_items: [1, 2, 3]
     become: no
     delegate_to: localhost
-    args:
-      warn: no  # suppres warning for not using the `file` module.
diff --git a/tests/user/certmapdata/test_users_certmapdata.yml b/tests/user/certmapdata/test_users_certmapdata.yml
index b871fb9cb792e858ff7ff17dfbc5c1574edeab20..491face65ffa79ea2872c6814b523f91e045c40a 100644
--- a/tests/user/certmapdata/test_users_certmapdata.yml
+++ b/tests/user/certmapdata/test_users_certmapdata.yml
@@ -161,11 +161,9 @@
     register: result
     failed_when: not result.changed or result.failed
 
-  - name: Remove certificate files.
+  - name: Remove certificate files.  # noqa: deprecated-command-syntax
     shell:
       cmd: rm -f "private{{ item }}.key" "cert{{ item }}.pem" "cert{{ item }}.der" "cert{{ item }}.b64"
     with_items: [1, 2, 3]
     become: no
     delegate_to: localhost
-    args:
-      warn: no  # suppres warning for not using the `file` module.
diff --git a/tests/user/test_users_invalid_cert.yml b/tests/user/test_users_invalid_cert.yml
index 0d75159a85a6e76666cba8a7b522225ff319d8b6..50112ce5e14712147ae4a6ab72f5666d3a9af906 100644
--- a/tests/user/test_users_invalid_cert.yml
+++ b/tests/user/test_users_invalid_cert.yml
@@ -54,11 +54,9 @@
     register: result
     failed_when: not result.changed or result.failed
 
-  - name: Remove certificate files.
+  - name: Remove certificate files.  # noqa: deprecated-command-syntax
     shell:
       cmd: rm -f "private{{ item }}.key" "cert{{ item }}.pem" "cert{{ item }}.der" "cert{{ item }}.b64"
     with_items: [1, 2]
     become: no
     delegate_to: localhost
-    args:
-      warn: no  # suppres warning for not using the `file` module.