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 39ee7e23da)
This commit is contained in:
Grzegorz Grasza 2020-11-19 11:13:09 +01:00
parent 61623ef5a8
commit dcab52658a

View File

@ -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: