mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-07 22:03:18 +00:00
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 ..)
This commit is contained in:
@@ -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'):
|
||||
|
||||
Reference in New Issue
Block a user