--- - name: Manage Users include_tasks: manage_user.yml loop: "{{ client.users | flatten }}" loop_control: loop_var: user - name: Manage User Roles include_tasks: manage_user_roles.yml loop: "{{ client.users | flatten }}" loop_control: loop_var: user when: "'client_roles' in user"