From a9fe85b1094fbf2142560e8b80e013b2f373c080 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Fri, 20 Oct 2017 02:28:49 +0200 Subject: [PATCH] Use freeipa_domain on all the systems, not just on client While reinstalling the freeipa server of gluster, I was surprised to see it was using rax.gluster.org. It turn out that it was installed as "freeipa.gluster.org", and then later got renamed to freeipa.rax.gluster.org, and so I didn't see that ansible would auto detect the domain incorrectly. --- defaults/main.yml | 1 + tasks/client.yml | 2 +- tasks/master.yml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 4e238bb..5d322c9 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,3 +1,4 @@ --- # freeipa_replicas: [] +freeipa_domain: "{{ ansible_domain }}" diff --git a/tasks/client.yml b/tasks/client.yml index 2607afc..0e1b733 100644 --- a/tasks/client.yml +++ b/tasks/client.yml @@ -15,7 +15,7 @@ when: ansible_domain is not defined - name: Install the client in the realm - shell: ipa-client-install --domain={{ freeipa_domain |default(ansible_domain) }} --server={{ freeipa_master }} -p admin -U -w {{ kerberos_admin_password }} + shell: ipa-client-install --domain={{ freeipa_domain }} --server={{ freeipa_master }} -p admin -U -w {{ kerberos_admin_password }} args: creates: /etc/ipa/default.conf no_log: True diff --git a/tasks/master.yml b/tasks/master.yml index f928712..6777621 100644 --- a/tasks/master.yml +++ b/tasks/master.yml @@ -1,6 +1,6 @@ --- - name: Install the master server - shell: ipa-server-install -r {{ ansible_domain | upper }} -n {{ ansible_domain }} -p {{ directory_admin_password }} -U -a {{ kerberos_admin_password }} --ip-address {{ ansible_default_ipv4.address }} + shell: ipa-server-install -r {{ freeipa_domain | upper }} -n {{ freeipa_domain }} -p {{ directory_admin_password }} -U -a {{ kerberos_admin_password }} --ip-address {{ ansible_default_ipv4.address }} args: creates: /etc/ipa/default.conf no_log: True