diff --git a/roles/ipaserver/library/ipaserver_setup_dns.py b/roles/ipaserver/library/ipaserver_setup_dns.py index 90605c8f6db2ca4a1550877f29e374cb4f94026f..1255a00ee379e37353eb33156c396a6477988350 100644 --- a/roles/ipaserver/library/ipaserver_setup_dns.py +++ b/roles/ipaserver/library/ipaserver_setup_dns.py @@ -70,6 +70,9 @@ def main(): forward_policy=dict(default='first', choices=['first', 'only']), no_dnssec_validation=dict(required=False, type='bool', default=False), + ### additional ### + dns_ip_addresses=dict(required=True, type='list'), + dns_reverse_zones=dict(required=True, type='list'), ), ) @@ -89,6 +92,10 @@ def main(): options.forward_policy = ansible_module.params.get('forward_policy') options.no_dnssec_validation = ansible_module.params.get( 'no_dnssec_validation') + ### additional ### + dns.ip_addresses = ansible_module_get_parsed_ip_addresses( + ansible_module, 'dns_ip_addresses') + dns.reverse_zones = ansible_module.params.get('dns_reverse_zones') # init ################################################################## diff --git a/roles/ipaserver/library/ipaserver_test.py b/roles/ipaserver/library/ipaserver_test.py index bcb9bc38ec6b2e1cce3a6647281230efbef9f47d..437e236db834f2a60a136bf9992312ad2877e3f7 100644 --- a/roles/ipaserver/library/ipaserver_test.py +++ b/roles/ipaserver/library/ipaserver_test.py @@ -772,7 +772,10 @@ def main(): forwarders=options.forwarders, ### additional ### _installation_cleanup=_installation_cleanup, - domainlevel=options.domainlevel) + domainlevel=options.domainlevel, + dns_ip_addresses=[ str(ip) for ip + in dns.ip_addresses ], + dns_reverse_zones=dns.reverse_zones) if __name__ == '__main__': main() diff --git a/roles/ipaserver/tasks/install.yml b/roles/ipaserver/tasks/install.yml index aa19f94ae86949896ee14a7dd3d0b6584688ec2e..69349e5aef44de1ec773eea0656d27f1af4dac36 100644 --- a/roles/ipaserver/tasks/install.yml +++ b/roles/ipaserver/tasks/install.yml @@ -352,6 +352,9 @@ forward_policy: "{{ ipaserver_forward_policy | default(omit) }}" zonemgr: "{{ ipaserver_zonemgr | default(omit) }}" no_dnssec_validation: "{{ ipaserver_no_dnssec_validation }}" + ### additional ### + dns_ip_addresses: "{{ ipaserver_test.dns_ip_addresses }}" + dns_reverse_zones: "{{ ipaserver_test.dns_reverse_zones }}" when: ipaserver_setup_dns | bool - name: Install - Setup ADTRUST