mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-29 19:04:42 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user