Skip to content

Commit 0e83328

Browse files
committed
feat: change loop approach in pulp_django_user
1 parent d5d4163 commit 0e83328

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

roles/pulp_django_user/tasks/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@
3737
Cookie: "{{ result_login.cookies_string }}"
3838
body:
3939
csrfmiddlewaretoken: "{{ result_login.cookies.csrftoken }}"
40-
username: "{{ item.username }}"
41-
password1: "{{ item.password }}"
42-
password2: "{{ item.password }}"
40+
username: "{{ pulp_django_users[user_index].username }}"
41+
password1: "{{ pulp_django_users[user_index].password }}"
42+
password2: "{{ pulp_django_users[user_index].password }}"
4343
body_format: form-urlencoded
4444
follow_redirects: all
4545
validate_certs: "{{ pulp_validate_certs | bool }}"
46-
loop: "{{ pulp_django_users }}"
46+
loop: "{{ pulp_django_users | map(attribute='username') }}"
4747
loop_control:
48-
label: "{{ item.username }}"
48+
index_var: user_index
4949

5050
- name: Add or remove user from group(s)
5151
include_tasks: user_groups/add_or_remove_users.yml

0 commit comments

Comments
 (0)