Switch to systemd automount for /srv/samba/schools/default-school

Replaced pam_mount with systemd automount to manage the mounting of the default school Samba share.
This change improves system integration and simplifies the mount process by leveraging systemd's capabilities.
This commit is contained in:
Raphael Dannecker 2025-07-16 08:02:37 +02:00
parent b6988ef640
commit 9df6c93636
3 changed files with 67 additions and 26 deletions

View file

@ -5,6 +5,7 @@
- sssd-ad
- sssd-tools
- adcli
- kstart
- name: Provide user identities from AD
ansible.builtin.template:
@ -22,3 +23,23 @@
when: >
ansible_cmdline.adpw | default('') | length > 0 or
adpw.user_input | default('') | length > 0
- name: Set CCache file name
ansible.builtin.lineinfile:
dest: /etc/krb5.conf
line: ' default_ccache_name = FILE:/tmp/krb5cc_%{uid}'
insertbefore: '\[realms\]'
state: present
- name: Create kstart systemd service for obtaining machine ticket
ansible.builtin.template:
src: kstart.service.j2
dest: /etc/systemd/system/kstart.service
mode: '0644'
when: not nfs4
- name: Enable kstart service
ansible.builtin.systemd:
name: kstart.service
enabled: true
when: not nfs4