ipaclient_setup_nss: Create DNS SSHFP records, update to latest FreeIPA

There have been several settings in ipaclient_setup_nss that have been
hard coded instead of using the settings from the role. This has been
fixed and the code in ipaclient_setup_nss has been updated to the latest
version of FreeIPA with compatibility changes for older FreeIPA versions.
Additionally the api is now properly configured so that the DNS SSHFP
records are now properly created if no_dns_sshfp is not enabled.
This commit is contained in:
Thomas Woerner
2019-04-26 13:13:43 +02:00
parent c18b777141
commit 9148dde50a
4 changed files with 383 additions and 166 deletions

View File

@@ -235,3 +235,19 @@ else:
raise Exception("freeipa version '%s' is too old" % VERSION)
def ansible_module_get_parsed_ip_addresses(ansible_module,
param='ip_addresses'):
ip_addresses = ansible_module.params.get(param)
if ip_addresses is None:
return None
ip_addrs = [ ]
for ip in ip_addresses:
try:
ip_parsed = ipautil.CheckedIPAddress(ip)
except Exception as e:
ansible_module.fail_json(msg="Invalid IP Address %s: %s" % (ip, e))
ip_addrs.append(ip_parsed)
return ip_addrs