29.10. Using Ansible to install an IdM client configured to use eDNS
You can use Ansible to install an IdM client with DNS-over-TLS (DoT) enabled. The example below applies the enforced DoT policy and requires the client to use eDNS queries exclusively.
Prerequisites
- You are using Ansible version 2.15 or later.
-
You have installed the
ansible-freeipapackage. -
The example assumes that the
secret.ymlAnsible vault stores youripaadmin_passwordand that you have access to a file that stores the password protecting thesecret.ymlfile. - You have configured the resolver for DNS over TLS on the client.
Procedure
On the controller, create a playbook named
install-client-edns.ymlthat includes a task to install an IdM client with eDNS enabled:--- - name: Playbook to configure an IdM client with eDNS enabled hosts: ipaclients become: true vars_files: - /home/user_name/MyPlaybooks/secret.yml vars: ipaadmin_password: "{{ ipaadmin_password }}" ipaclient_domain=idm.example.com ipaclient_dns_over_tls=true roles: - role: freeipa.ansible_freeipa.ipaclientIf DNSSEC validation is turned off on the IdM server that the client is communicating with, you must also disable it on the client by setting
ipaclient_no_dnssec_validation = truein thevarssection of the playbook. Otherwise, DNS over TLS will not function correctly for the client.Run the Ansible playbook:
$ ansible-playbook --vault-password-file=password_file -v -i ~/MyPlaybooks/inventory ~/MyPlaybooks/install-client-edns.yml
Verification
On the IdM client, review
/etc/unbound/unbound.conf:$ cat /etc/unbound/unbound.conf- Verify that the configuration contains the IP address and host name of the IdM server.
Troubleshooting
On the IdM client, run a DNS query to trigger traffic:
$ dig <domain_name>- Review the logs on the IdM server to verify that the query was routed through DoT.