From 4b392af30cad3f9c79f7f457741882e70773a939 Mon Sep 17 00:00:00 2001 From: Grzegorz Grasza Date: Thu, 19 Nov 2020 11:13:09 +0100 Subject: [PATCH] Don't pass empty values for ipaclient_servers to ipaclient role This avoids passing an empty value to the --server and --domain options of ipa-client-install. These are then auto-detected, as described in the IdMServer and IdMDomain parameters descriptions. Change-Id: I3a8725f0b64caf9fa50c90bf49634dffe0ad9b79 Closes-Bug: #1904856 Resolves: rhbz#1874936 (cherry picked from commit 39ee7e23dadedcd6de2ab3f30b322954379b8214) --- .../ipa/ipaservices-baremetal-ansible.yaml | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/deployment/ipa/ipaservices-baremetal-ansible.yaml b/deployment/ipa/ipaservices-baremetal-ansible.yaml index 01f52488d1..9d916ad322 100644 --- a/deployment/ipa/ipaservices-baremetal-ansible.yaml +++ b/deployment/ipa/ipaservices-baremetal-ansible.yaml @@ -124,18 +124,24 @@ outputs: - name: enroll the node as an ipa client when: step|int == 1 vars: - state: present - ipaclient_otp: "{{ ipa_host_otp }}" - idm_enroll_base_server: {get_param: IdMEnrollBaseServer} - ipaclient_mkhomedir: {get_param: MakeHomeDir} - ipaclient_domain: {get_param: IdMDomain} - ipaclient_no_ntp: {get_param: IdMNoNtpSetup} - ipaclient_force: yes - ipaclient_servers: {get_param: IdMServer} - ipaclient_hostname: "{{ fqdn_canonical }}" - ipaclient_install_packages: {get_param: IdMInstallClientPackages} - ipaclients: - - "{{ inventory_hostname }}" + map_merge: + - + state: present + ipaclient_otp: "{{ ipa_host_otp }}" + idm_enroll_base_server: {get_param: IdMEnrollBaseServer} + ipaclient_mkhomedir: {get_param: MakeHomeDir} + ipaclient_no_ntp: {get_param: IdMNoNtpSetup} + ipaclient_force: yes + ipaclient_hostname: "{{ fqdn_canonical }}" + ipaclient_install_packages: {get_param: IdMInstallClientPackages} + ipaclients: + - "{{ inventory_hostname }}" + - + if: + - idm_server_provided + - ipaclient_servers: {get_param: IdMServer} + ipaclient_domain: {get_param: IdMDomain} + - {} block: - name: check if default.conf exists stat: