From 3b84039ffd7aeb0ba8f6f2d0a33e73bd71ce1f10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Marigot?= Date: Thu, 22 Aug 2024 00:54:23 +0200 Subject: [PATCH] Avoid an error if ipadefaultemaildomain if not defined The IPA configuration "ipadefaultemaildomain" is optional (in this case the key don't exist) --- plugins/modules/ipauser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/ipauser.py b/plugins/modules/ipauser.py index 2ffddc1127..b9ded6cd1f 100644 --- a/plugins/modules/ipauser.py +++ b/plugins/modules/ipauser.py @@ -1277,7 +1277,7 @@ def main(): # Default email domain result = ansible_module.ipa_command_no_name("config_show", {}) - default_email_domain = result["result"]["ipadefaultemaildomain"][0] + default_email_domain = result["result"]["ipadefaultemaildomain"][0] if "ipadefaultemaildomain" in result["result"] else None # Extend email addresses