From c394c808e671dbb12048c5e2da6a5d2b30e3b238 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 16 Feb 2021 15:37:12 +0100 Subject: [PATCH] ipa/client: Deal better with unset IPA variables Signed-off-by: Nils Philippsen --- roles/ipa/client/tasks/common.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/roles/ipa/client/tasks/common.yml b/roles/ipa/client/tasks/common.yml index af968bb281..b064783769 100644 --- a/roles/ipa/client/tasks/common.yml +++ b/roles/ipa/client/tasks/common.yml @@ -12,9 +12,10 @@ changed_when: false loop: >- {{ - ipa_server_user_groups - + (ipa_server_all_groups_hosts_dict | list | product(['sysadmin-main']) | list) + (ipa_server_user_groups | default([])) + + (ipa_server_all_groups_hosts_dict | default({}) | list | product(['sysadmin-main']) | list) }} + when: ipa_server_user_groups is defined or ipa_server_all_groups_hosts_dict is defined ## Rules specific to hosts, host groups