Skip to content

Commit

Permalink
Empty string is treated as ['']
Browse files Browse the repository at this point in the history
  • Loading branch information
sverhoeven committed Mar 20, 2024
1 parent 8d30bbb commit fdbb0f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion roles/grader/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
name: "{{ item.split(':') | first }}"
password: "{{ item.split(':') | last | password_hash(hashtype='sha512') }}"
shell: /bin/bash
loop: "{{ students.split(',') | default([]) }}"
loop: "{{ students.split(',') }}"
when: students != ''

- name: List all non-grader_user non-system users
shell: set -o pipefail && ls -1 | grep -v lost+found | grep -v {{ grader_user }}
Expand Down

0 comments on commit fdbb0f4

Please sign in to comment.