diff --git a/roles/ipaclient/tasks/install.yml b/roles/ipaclient/tasks/install.yml
index 034c441914eeed849b1dc3ea3719ccf923c91233..3efc8b609a2c5cee78c8336cf1674e1526be2c4e 100644
--- a/roles/ipaclient/tasks/install.yml
+++ b/roles/ipaclient/tasks/install.yml
@@ -44,7 +44,8 @@
       searchdomains: "{{ ipaserver_domain | default(ipaclient_domain) }}"
       state: present
 
-  when: ipaclient_configure_dns_resolver
+  when: ipaclient_configure_dns_resolver | bool
+        and not ipaclient_on_master | bool
 
 - name: Install - IPA client test
   ipaclient_test: