ansible_freeipa_module: New api_get_basedn, IPAAnsibleModule.ipa_get_basedn

These functions have been added to get the basedb from api.env for use
with DN for example.

api_get_basedn is returning api.env.basedn
IPAAnsibleModule.ipa_get_basedn is a wrapper for api_get_basedn
This commit is contained in:
Thomas Woerner
2021-12-22 12:13:53 +01:00
parent e7f902ca48
commit 9eefc1ae7c

View File

@@ -419,6 +419,9 @@ else:
def api_get_realm():
return api.env.realm
def api_get_basedn():
return api.env.basedn
def gen_add_del_lists(user_list, res_list):
"""
Generate the lists for the addition and removal of members.
@@ -882,6 +885,11 @@ else:
"""Retrieve IPA API realm."""
return api_get_realm()
@staticmethod
def ipa_get_basedn():
"""Retrieve IPA API basedn."""
return api_get_basedn()
@staticmethod
def ipa_command_exists(command):
"""