From 1428143d73112033f43b45be79da8faa5e82b3d5 Mon Sep 17 00:00:00 2001 From: Thomas Woerner <twoerner@redhat.com> Date: Mon, 21 Oct 2019 12:02:14 +0200 Subject: [PATCH] ansible_freeipa_module: New function api_get_realm The function api_get_realm is returning the realm of a connected FreeIPA api. This is needed for proper principal checks in the extended ipauser module that supports principals now. --- plugins/module_utils/ansible_freeipa_module.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/module_utils/ansible_freeipa_module.py b/plugins/module_utils/ansible_freeipa_module.py index f8b7b6b1..eedb5c28 100644 --- a/plugins/module_utils/ansible_freeipa_module.py +++ b/plugins/module_utils/ansible_freeipa_module.py @@ -211,3 +211,7 @@ def _afm_convert(value): def module_params_get(module, name): return _afm_convert(module.params.get(name)) + + +def api_get_realm(): + return api.env.realm -- GitLab