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

Merge remote-tracking branch 'upstream/master'

parents db12c095 c824cf67
Branches
Tags
No related merge requests found
...@@ -197,6 +197,12 @@ def ensure_host_present(module, api, ipahost): ...@@ -197,6 +197,12 @@ def ensure_host_present(module, api, ipahost):
if module.check_mode: if module.check_mode:
module.exit_json(changed=True) module.exit_json(changed=True)
# If we want to create a random password, and the host
# already has Keytab: true, then we need first to run
# ipa host-disable in order to remove OTP and keytab
if module.params.get('random') and ipahost['has_keytab'] == True:
api.Command.host_disable(fqdn)
result = api.Command.host_mod(fqdn, **diffs) result = api.Command.host_mod(fqdn, **diffs)
# Save random password as it is not displayed by host-show # Save random password as it is not displayed by host-show
if module.params.get('random'): if module.params.get('random'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment