From b803886c1f9429e0b9a57665dc93b39a420b6cd2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Sachse?= <joerg.sachse@slub-dresden.de>
Date: Fri, 3 Mar 2023 10:10:40 +0100
Subject: [PATCH] fix: correct failure conditions for user creation to cover
 all cases

---
 tasks/oracle/create_db_users.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tasks/oracle/create_db_users.yml b/tasks/oracle/create_db_users.yml
index e75e0ec..c8f28c5 100644
--- a/tasks/oracle/create_db_users.yml
+++ b/tasks/oracle/create_db_users.yml
@@ -17,9 +17,9 @@
     state: present
   register: db_user
   failed_when:
-    - "db_user.rc != 0"
     # Ignore this error, because usually, the Oracle DB user has running pro-
     # cesses and cannot be changed while the DB is running.
+    - "db_user.msg is defined"
     - "'is currently used by process' not in db_user.msg"
 
 # The DB user doesn't actually use this dir, but it's nice for admins to put
-- 
GitLab