Make IP addresses of teacherpc configurable (for the firewall in exam mode)
This commit is contained in:
parent
a008ef0506
commit
cf7bf30e05
1 changed files with 2 additions and 1 deletions
|
|
@ -52,10 +52,11 @@
|
||||||
|
|
||||||
- name: Append teacherPC to exam_destination_allowed_ipv4 addresses
|
- name: Append teacherPC to exam_destination_allowed_ipv4 addresses
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
exam_destination_allowed_ipv4: "{{ exam_destination_allowed_ipv4 + [ ansible_default_ipv4.address.rsplit('.', 1)[0] ~ '.' ~ exam_teacherpc_last_digit ] }}"
|
exam_destination_allowed_ipv4: "{{ exam_destination_allowed_ipv4 + (exam_teacherpc_ips | default([ ansible_default_ipv4.address.rsplit('.', 1)[0] ~ '.' ~ exam_teacherpc_last_digit ])) }}"
|
||||||
when:
|
when:
|
||||||
- exam_destination_allowed_ipv4 is defined
|
- exam_destination_allowed_ipv4 is defined
|
||||||
- exam_destination_allowed_ipv4 | length > 0
|
- exam_destination_allowed_ipv4 | length > 0
|
||||||
|
- exam_teacherpc_ips is defined or exam_teacherpc_last_digit | default('') | string | length > 0
|
||||||
|
|
||||||
- name: Install no-way-out-policy
|
- name: Install no-way-out-policy
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue