From ceb4224afe6923c0d31ccb422e8e96e65300e0b4 Mon Sep 17 00:00:00 2001
From: Thomas Woerner <twoerner@redhat.com>
Date: Wed, 31 Jan 2018 23:22:54 +0100
Subject: [PATCH] ipaclient/tasks/install.yml: Support client usage in server
 role

The server role has different setting names:

- groups.ipaserver: groups.ipaservers
- ipaserver_domain: ipaclient_domain
- ipaserver_realm: ipaclient_realm

Both need to be supported to be able to sue the client role within the server
role, but also standalone.
---
 roles/ipaclient/tasks/install.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/roles/ipaclient/tasks/install.yml b/roles/ipaclient/tasks/install.yml
index 2d919389..b079837d 100644
--- a/roles/ipaclient/tasks/install.yml
+++ b/roles/ipaclient/tasks/install.yml
@@ -13,9 +13,9 @@
 
 - name: Install - IPA discovery
   ipadiscovery:
-    domain: "{{ ipaclient_domain | default(omit) }}"
-    servers: "{{ groups.ipaservers | default(omit) }}"
-    realm: "{{ ipaclient_realm | default(omit) }}"
+    domain: "{{ ipaserver_domain | default(ipaclient_domain) | default(omit) }}"
+    servers: "{{ groups.ipaserver | default(groups.ipaservers) | default(omit) }}"
+    realm: "{{ ipaserver_realm | default(ipaclient_realm) | default(omit) }}"
     hostname: "{{ ipaclient_hostname | default(ansible_fqdn) }}"
     ca_cert_file: "{{ ipaclient_ca_cert_file | default(omit) }}"
     on_master: "{{ ipaclient_on_master }}"
-- 
GitLab