Skip to content

Commit

Permalink
library/ipaclient_get_otp: Enable force mode for host_add call
Browse files Browse the repository at this point in the history
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 ..)
  • Loading branch information
t-woerner committed Jul 11, 2019
1 parent 8cd34b4 commit 1fa1468
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions roles/ipaclient/library/ipaclient_get_otp.py
Expand Up @@ -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'):
Expand Down

0 comments on commit 1fa1468

Please sign in to comment.