mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-08-01 20:34:41 +00:00
ipaclient: Fix issues with FreeIPA 4.6 and prior
check_ldap_conf is only available in FreeIPA 4.7 and later and tasks.is_nosssd_supported is only available since 4.6.90.pre2. check_ldap_conf is None (ansible_ipa_client) if it can not be imported. hasattr has been added to check if is_nosssd_supported is a valid attribute in tasks. Fixes: #61 (ipaserver role - Fails on ipaclient install)
This commit is contained in:
@@ -484,6 +484,7 @@ def main():
|
|||||||
# "IPA client is already configured on this system.",
|
# "IPA client is already configured on this system.",
|
||||||
# rval=CLIENT_ALREADY_CONFIGURED)
|
# rval=CLIENT_ALREADY_CONFIGURED)
|
||||||
|
|
||||||
|
if check_ldap_conf is not None:
|
||||||
check_ldap_conf()
|
check_ldap_conf()
|
||||||
|
|
||||||
if options.conf_ntp:
|
if options.conf_ntp:
|
||||||
@@ -526,6 +527,7 @@ def main():
|
|||||||
"Invalid hostname, '{}' must not be used.".format(hostname),
|
"Invalid hostname, '{}' must not be used.".format(hostname),
|
||||||
rval=CLIENT_INSTALL_ERROR)
|
rval=CLIENT_INSTALL_ERROR)
|
||||||
|
|
||||||
|
if hasattr(tasks, "is_nosssd_supported"):
|
||||||
# --no-sssd is not supported any more for rhel-based distros
|
# --no-sssd is not supported any more for rhel-based distros
|
||||||
if not tasks.is_nosssd_supported() and not options.sssd:
|
if not tasks.is_nosssd_supported() and not options.sssd:
|
||||||
raise ScriptError(
|
raise ScriptError(
|
||||||
|
|||||||
Reference in New Issue
Block a user