ipa_host: Maintain the host certificates (#9694)
* ipa_host: Maintain the host certificates Fix #9693 * Add changelog fragment * Fix changelog message * Fix changelog message againpull/9722/head
parent
4e0de41a85
commit
d5add1ed9f
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- ipa_host - module revoked existing host certificates even if ``user_certificate`` was not given (https://github.com/ansible-collections/community.general/pull/9694).
|
|
@ -270,6 +270,10 @@ def ensure(module, client):
|
|||
data = {}
|
||||
for key in diff:
|
||||
data[key] = module_host.get(key)
|
||||
if "usercertificate" not in data:
|
||||
data["usercertificate"] = [
|
||||
cert['__base64__'] for cert in ipa_host.get("usercertificate", [])
|
||||
]
|
||||
ipa_host_show = client.host_show(name=name)
|
||||
if ipa_host_show.get('has_keytab', True) and (state == 'disabled' or module.params.get('random_password')):
|
||||
client.host_disable(name=name)
|
||||
|
|
Loading…
Reference in New Issue