From 21f4cbcbc3aaba527b50d5882240ac5fa4b78d27 Mon Sep 17 00:00:00 2001 From: Raphael Dannecker Date: Thu, 11 Dec 2025 17:27:50 +0100 Subject: [PATCH] Correct the determination of the teacher's PC's IP address (a75934c) --- roles/lmn_exam/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/lmn_exam/tasks/main.yml b/roles/lmn_exam/tasks/main.yml index aba8b29..3e1f3b7 100644 --- a/roles/lmn_exam/tasks/main.yml +++ b/roles/lmn_exam/tasks/main.yml @@ -52,7 +52,7 @@ - name: Append teacherPC to exam_destination_allowed_ipv4 addresses ansible.builtin.set_fact: - exam_destination_allowed_ipv4: "{{ exam_destination_allowed_ipv4 + [ ansible_default_ipv4.address[:-1] ~ exam_teacherpc_last_digit ] }}" + exam_destination_allowed_ipv4: "{{ exam_destination_allowed_ipv4 + [ ansible_default_ipv4.address.rsplit('.', 1)[0] ~ '.' ~ exam_teacherpc_last_digit ] }}" when: - exam_destination_allowed_ipv4 is defined - exam_destination_allowed_ipv4 | length > 0