Skip to content
Snippets Groups Projects
Commit 1fa1468b authored by Thomas Woerner's avatar Thomas Woerner
Browse files

library/ipaclient_get_otp: Enable force mode for host_add call

When OTP is used for installation of a client or the client part of
a replica and also there is no DNS record for the client, then
ipaclient_get_otp fails in the host_add call.

With the force mode the host_add call will ignore the missing DNS
record and will properly add the host. The host information and also
the DNS record will be updated while deploying the client according
to the given settings.

Fixes: #74 (ipaclient fails when ipaclient_use_otp is true and client ..)
parent 8cd34b4d
No related branches found
No related tags found
No related merge requests found
......@@ -265,6 +265,8 @@ def ensure_host_present(module, api, ipahost):
# Must add the user
module_host = get_module_host(module)
# force creation of host even if there is no DNS record
module_host["force"] = True
result = api.Command.host_add(fqdn, **module_host)
# Save random password as it is not displayed by host-show
if module.params.get('random'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment