From d3887ae9bd0c7084e9a26db19787b96365bc062a Mon Sep 17 00:00:00 2001 From: Guido Grazioli Date: Tue, 1 Feb 2022 09:19:26 +0100 Subject: [PATCH] move client roles check out of loop --- roles/keycloak_realm/tasks/main.yml | 2 +- roles/keycloak_realm/tasks/manage_client_roles.yml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/roles/keycloak_realm/tasks/main.yml b/roles/keycloak_realm/tasks/main.yml index ff6e27e..a9a18cd 100644 --- a/roles/keycloak_realm/tasks/main.yml +++ b/roles/keycloak_realm/tasks/main.yml @@ -67,10 +67,10 @@ - name: Create client roles include_tasks: manage_client_roles.yml - when: keycloak_rhsso_enable loop: "{{ keycloak_clients | flatten }}" loop_control: loop_var: client + when: "'roles' in client" - name: Create client users include_tasks: manage_client_users.yml diff --git a/roles/keycloak_realm/tasks/manage_client_roles.yml b/roles/keycloak_realm/tasks/manage_client_roles.yml index 05df77f..d7fca8d 100644 --- a/roles/keycloak_realm/tasks/manage_client_roles.yml +++ b/roles/keycloak_realm/tasks/manage_client_roles.yml @@ -10,4 +10,3 @@ auth_password: "{{ keycloak_admin_password }}" state: present loop: "{{ client.roles | flatten }}" - when: "'roles' in client"