Skip to content

Commit

Permalink
Call split on string
Browse files Browse the repository at this point in the history
Seems SRC is running old jinja2 template:
template error while templating string: no filter named \'split\'. String: {{ students | split(\',\') | default([]) }}\\"
  • Loading branch information
sverhoeven committed Mar 20, 2024
1 parent f1c9db1 commit 06a5f87
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions roles/grader/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@
become_user: "{{ grader_user }}"
- name: Create student posix users
ansible.builtin.user:
name: "{{ item | split(':') | first }}"
password: "{{ item | split(':') | last | password_hash(hashtype='sha512') }}"
name: "{{ item.split(':') | first }}"
password: "{{ item.split(':') | last | password_hash(hashtype='sha512') }}"
shell: /bin/bash
loop: "{{ students | split(',') | default([]) }}"
loop: "{{ students.split(',') | default([]) }}"

- 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 06a5f87

Please sign in to comment.