mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-06 21:33:14 +00:00
ipareplica_prepare: Use MIN_DOMAIN_LEVEL instead of DOMAIN_LEVEL_1 in checks
With FreeIPA 4.7.0 there is no support for domain level 0 anymore, the check for the minimal domain level should use MIN_DOMAIN_LEVEL instead of DOMAIN_LEVEL_1.
This commit is contained in:
@@ -420,17 +420,17 @@ def main():
|
||||
|
||||
ansible_log.debug("-- CHECK DOMAIN_LEVEL --")
|
||||
|
||||
# Make sure that domain fulfills minimal domain level
|
||||
# requirement
|
||||
domain_level = current_domain_level(remote_api)
|
||||
check_domain_level_is_supported(domain_level)
|
||||
if domain_level < constants.DOMAIN_LEVEL_1:
|
||||
ansible_module.fail_json(msg=
|
||||
"You used the wrong mechanism to install a replica in "
|
||||
"domain level {dl}:\n"
|
||||
"\tFor domain level >= 1 replica installation, first join the "
|
||||
"domain by running ipa-client-install, then run "
|
||||
"ipa-replica-install without a replica file."
|
||||
.format(dl=domain_level)
|
||||
)
|
||||
if domain_level < constants.MIN_DOMAIN_LEVEL:
|
||||
ansible_module.fail_json(
|
||||
msg=
|
||||
"Cannot promote this client to a replica. The domain level "
|
||||
"must be raised to {mindomainlevel} before the replica can be "
|
||||
"installed".format(
|
||||
mindomainlevel=constants.MIN_DOMAIN_LEVEL))
|
||||
|
||||
ansible_log.debug("-- CHECK AUTHORIZATION --")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user