diff --git a/playbooks/roles/bootlinux/tasks/install-deps/redhat/main.yml b/playbooks/roles/bootlinux/tasks/install-deps/redhat/main.yml
index cb5399ed6afd..acb9380cdb65 100644
--- a/playbooks/roles/bootlinux/tasks/install-deps/redhat/main.yml
+++ b/playbooks/roles/bootlinux/tasks/install-deps/redhat/main.yml
@@ -8,7 +8,7 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
   vars:
     packages:
       - epel-release
@@ -23,7 +23,7 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
   vars:
     packages:
       - bison
@@ -71,7 +71,7 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
   vars:
     packages:
       - btrfs-progs
diff --git a/playbooks/roles/create_partition/tasks/install-deps/redhat/main.yml b/playbooks/roles/create_partition/tasks/install-deps/redhat/main.yml
index 8d276e569f35..135c032553dd 100644
--- a/playbooks/roles/create_partition/tasks/install-deps/redhat/main.yml
+++ b/playbooks/roles/create_partition/tasks/install-deps/redhat/main.yml
@@ -19,7 +19,7 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
   vars:
     packages:
       - btrfs-progs
diff --git a/playbooks/roles/devconfig/tasks/install-deps/redhat/main.yml b/playbooks/roles/devconfig/tasks/install-deps/redhat/main.yml
index 707844310ef8..60d149696b8c 100644
--- a/playbooks/roles/devconfig/tasks/install-deps/redhat/main.yml
+++ b/playbooks/roles/devconfig/tasks/install-deps/redhat/main.yml
@@ -42,7 +42,7 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
   when:
     - devconfig_try_upgrade|bool
 
@@ -144,7 +144,7 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
   when:
     - devconfig_try_install_kdevtools|bool
 
@@ -188,7 +188,7 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
   when:
     - devconfig_enable_systemd_journal_remote|bool
     - ansible_facts['os_family']|lower == 'redhat' or ansible_facts['distribution_major_version'] | int >= 8
@@ -203,7 +203,7 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
   when:
     - devconfig_enable_systemd_timesyncd|bool
   tags: timesyncd
diff --git a/playbooks/roles/fstests/tasks/install-deps/redhat/main.yml b/playbooks/roles/fstests/tasks/install-deps/redhat/main.yml
index fc4208db0bbe..a4201e7ca682 100644
--- a/playbooks/roles/fstests/tasks/install-deps/redhat/main.yml
+++ b/playbooks/roles/fstests/tasks/install-deps/redhat/main.yml
@@ -22,7 +22,7 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
   vars:
     packages:
       - epel-release
@@ -37,7 +37,7 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
   vars:
     packages:
       - bison
@@ -98,7 +98,7 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
   vars:
     packages:
       - xfsprogs-xfs_scrub
@@ -114,7 +114,7 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
   vars:
     packages:
       - btrfs-progs
@@ -130,7 +130,7 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
   vars:
     packages:
       - inih-devel
diff --git a/playbooks/roles/fstests_prep_localhost/tasks/install-deps/redhat/main.yml b/playbooks/roles/fstests_prep_localhost/tasks/install-deps/redhat/main.yml
index 3d086b0fe8e1..1f42ebcb972c 100644
--- a/playbooks/roles/fstests_prep_localhost/tasks/install-deps/redhat/main.yml
+++ b/playbooks/roles/fstests_prep_localhost/tasks/install-deps/redhat/main.yml
@@ -8,7 +8,7 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
   vars:
     packages:
       - python3-junitxml
diff --git a/playbooks/roles/install_systemd_journal_remote/tasks/install-deps/redhat/main.yml b/playbooks/roles/install_systemd_journal_remote/tasks/install-deps/redhat/main.yml
index 72c2eeeeebf1..646fc0ee1e3f 100644
--- a/playbooks/roles/install_systemd_journal_remote/tasks/install-deps/redhat/main.yml
+++ b/playbooks/roles/install_systemd_journal_remote/tasks/install-deps/redhat/main.yml
@@ -8,7 +8,7 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
   when:
     - devconfig_enable_systemd_journal_remote|bool
   tags: journal
diff --git a/playbooks/roles/install_systemd_timesyncd/tasks/install-deps/redhat/main.yml b/playbooks/roles/install_systemd_timesyncd/tasks/install-deps/redhat/main.yml
index 1a19d099d8a3..d80720637774 100644
--- a/playbooks/roles/install_systemd_timesyncd/tasks/install-deps/redhat/main.yml
+++ b/playbooks/roles/install_systemd_timesyncd/tasks/install-deps/redhat/main.yml
@@ -8,7 +8,7 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
   when:
     - devconfig_enable_systemd_timesyncd|bool
   tags: timesyncd
diff --git a/playbooks/roles/kdc/tasks/install-deps/redhat/main.yml b/playbooks/roles/kdc/tasks/install-deps/redhat/main.yml
index c393920d95f6..f92f51099ded 100644
--- a/playbooks/roles/kdc/tasks/install-deps/redhat/main.yml
+++ b/playbooks/roles/kdc/tasks/install-deps/redhat/main.yml
@@ -8,7 +8,7 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
   vars:
     packages:
       - krb5-server
diff --git a/playbooks/roles/krb5/tasks/install-deps/redhat/main.yml b/playbooks/roles/krb5/tasks/install-deps/redhat/main.yml
index 511f221f0866..109f575bdd14 100644
--- a/playbooks/roles/krb5/tasks/install-deps/redhat/main.yml
+++ b/playbooks/roles/krb5/tasks/install-deps/redhat/main.yml
@@ -8,7 +8,7 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
   vars:
     packages:
       - krb5-libs
diff --git a/playbooks/roles/ktls/tasks/install-deps/redhat/main.yml b/playbooks/roles/ktls/tasks/install-deps/redhat/main.yml
index 802ef2a4c3ed..6920ab7bf92c 100644
--- a/playbooks/roles/ktls/tasks/install-deps/redhat/main.yml
+++ b/playbooks/roles/ktls/tasks/install-deps/redhat/main.yml
@@ -39,7 +39,7 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
   vars:
     packages:
       - python3-cryptography
diff --git a/playbooks/roles/nfsd/tasks/install-deps/redhat/main.yml b/playbooks/roles/nfsd/tasks/install-deps/redhat/main.yml
index d5d25c205f6e..5093e3b718c5 100644
--- a/playbooks/roles/nfsd/tasks/install-deps/redhat/main.yml
+++ b/playbooks/roles/nfsd/tasks/install-deps/redhat/main.yml
@@ -30,4 +30,4 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
diff --git a/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml b/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml
index 0f98aad99eed..f4aee14c5430 100644
--- a/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml
+++ b/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml
@@ -22,7 +22,7 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
   vars:
     packages:
       - gcc
diff --git a/playbooks/roles/smbd/tasks/install-deps/redhat/main.yml b/playbooks/roles/smbd/tasks/install-deps/redhat/main.yml
index 1f4e62b71cf8..92baaee36713 100644
--- a/playbooks/roles/smbd/tasks/install-deps/redhat/main.yml
+++ b/playbooks/roles/smbd/tasks/install-deps/redhat/main.yml
@@ -30,4 +30,4 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
diff --git a/playbooks/roles/sysbench/tasks/install-deps/redhat/main.yml b/playbooks/roles/sysbench/tasks/install-deps/redhat/main.yml
index d63b66fb0d3d..abe95cb0c5a0 100644
--- a/playbooks/roles/sysbench/tasks/install-deps/redhat/main.yml
+++ b/playbooks/roles/sysbench/tasks/install-deps/redhat/main.yml
@@ -22,7 +22,7 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
   vars:
     packages:
       - epel-release
@@ -37,7 +37,7 @@
   retries: 3
   delay: 5
   register: result
-  until: result.rc == 0
+  until: result is succeeded
   vars:
     packages:
       - docker
