diff --git a/roles/custom/fvs/files/lmn-codeblocks.sh b/roles/custom/fvs/files/lmn-codeblocks.sh new file mode 100644 index 0000000..27f24b3 --- /dev/null +++ b/roles/custom/fvs/files/lmn-codeblocks.sh @@ -0,0 +1,15 @@ +if [[ "$UID" -gt 10000 ]] && [[ ! -f ~/.config/codeblocks/default.conf ]] ; then + mkdir -p ~/.config/codeblocks + cat < ~/.config/codeblocks/default.conf + + + + + + + + + + +EOF +fi diff --git a/roles/custom/fvs/tasks/main.yml b/roles/custom/fvs/tasks/main.yml index b5e1094..3e1e756 100644 --- a/roles/custom/fvs/tasks/main.yml +++ b/roles/custom/fvs/tasks/main.yml @@ -156,6 +156,11 @@ dest: /etc/profile.d/ mode: '0644' +- name: Copy codeblocks config scripts + ansible.builtin.copy: + src: lmn-codeblocks.sh + dest: /etc/profile.d/ + mode: '0644' - name: Copy fvs-config.js to configure plasma ansible.builtin.copy: @@ -188,6 +193,15 @@ action/switch_user=false #action/lock_screen=false +- name: Configure NumLock ON + ansible.builtin.blockinfile: + path: /etc/xdg/kcminputrc + create: true + mode: '0644' + block: | + [Keyboard] + NumLock=0 + - name: Start with empty session by default ansible.builtin.copy: dest: /etc/xdg/ksmserverrc diff --git a/roles/lmn_exam/tasks/main.yml b/roles/lmn_exam/tasks/main.yml index 838fd68..1d0893e 100644 --- a/roles/lmn_exam/tasks/main.yml +++ b/roles/lmn_exam/tasks/main.yml @@ -52,10 +52,11 @@ - 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 + (exam_teacherpc_ips | default([ ansible_default_ipv4.address.rsplit('.', 1)[0] ~ '.' ~ exam_teacherpc_last_digit ])) }}" when: - exam_destination_allowed_ipv4 is defined - 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 ansible.builtin.template: diff --git a/roles/lmn_sssd/templates/sssd.conf.j2 b/roles/lmn_sssd/templates/sssd.conf.j2 index fef5d02..1591f1d 100644 --- a/roles/lmn_sssd/templates/sssd.conf.j2 +++ b/roles/lmn_sssd/templates/sssd.conf.j2 @@ -9,7 +9,9 @@ ad_domain = {{ domain }} id_provider = ad access_provider = ad use_fully_qualified_names = False +{% if localhome is defined and localhome %} cache_credentials = True +{% endif %} krb5_store_password_if_offline = True default_shell = /usr/bin/bash # default: # ldap_id_mapping = True