From 0515f18623de56903ecc6610ca129643a8fdfd6a Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Sun, 29 Jan 2023 18:24:18 +0200 Subject: [PATCH] ignore error creating --- tasks/configure_dbmail_users.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/configure_dbmail_users.yml b/tasks/configure_dbmail_users.yml index 9146fb2..a8da53b 100644 --- a/tasks/configure_dbmail_users.yml +++ b/tasks/configure_dbmail_users.yml @@ -1,10 +1,11 @@ --- - name: Ensure user accounts are present - shell: "dbmail-users -l {{ item.username }} || dbmail-users -a {{ item.username }}" + shell: "dbmail-users -a {{ item.username }}" loop: "{{ dbmail_users }}" register: result failed_when: result.rc > 1 no_log: true + ignore_errors: true - name: Set user accounts password shell: "dbmail-users -c {{ item.username }} -w {{ item.password}} -p {{ item.password_type | default('sha512') }}"