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"