move client roles check out of loop

main
Guido Grazioli 2022-02-01 09:19:26 +01:00
parent ce6982ad51
commit d3887ae9bd
No known key found for this signature in database
GPG Key ID: 22C8C31EF2BC093B
2 changed files with 1 additions and 2 deletions

View File

@ -67,10 +67,10 @@
- name: Create client roles - name: Create client roles
include_tasks: manage_client_roles.yml include_tasks: manage_client_roles.yml
when: keycloak_rhsso_enable
loop: "{{ keycloak_clients | flatten }}" loop: "{{ keycloak_clients | flatten }}"
loop_control: loop_control:
loop_var: client loop_var: client
when: "'roles' in client"
- name: Create client users - name: Create client users
include_tasks: manage_client_users.yml include_tasks: manage_client_users.yml

View File

@ -10,4 +10,3 @@
auth_password: "{{ keycloak_admin_password }}" auth_password: "{{ keycloak_admin_password }}"
state: present state: present
loop: "{{ client.roles | flatten }}" loop: "{{ client.roles | flatten }}"
when: "'roles' in client"