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:
parent
b6988ef640
commit
9df6c93636
3 changed files with 67 additions and 26 deletions
|
|
@ -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
|
||||
|
|
|
|||
11
roles/lmn_sssd/templates/kstart.service.j2
Normal file
11
roles/lmn_sssd/templates/kstart.service.j2
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=K5Start Kerberos Ticket Renewal
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/k5start -f /etc/krb5.keytab -K 1 -u {{ ansible_hostname | upper }}$
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue