Move PAM mount config for VMs to corresponding role. Cleanup.

This commit is contained in:
Andreas B. Mundt 2023-08-18 09:56:19 +02:00
parent 793b37853e
commit 2f7da9c1b4
3 changed files with 24 additions and 63 deletions

View file

@ -9,10 +9,10 @@
- davfs2
state: latest
- name: Configure pam_mount
- name: Configure pam_mount for LMN homes
blockinfile:
dest: /etc/security/pam_mount.conf.xml
marker: "<!-- {mark} ANSIBLE MANAGED BLOCK -->"
marker: "<!-- {mark} ANSIBLE MANAGED BLOCK (mount LMN homes) -->"
block: |
<!-- mounts for home, share and nextcloud -->
<volume
@ -30,20 +30,6 @@
options="username=%(USER),nosuid,nodev,uid=%(USER),gid=1010,grpid,file_mode=0770,dir_mode=0770,forceuid,forcegid"
><not><or><user>root</user><user>ansible</user><user>Debian-gdm</user><user>sddm</user><user>virti</user></or></not>
</volume>
<!-- bind mounts for the VMs, setting gid here does not work -->
<volume
path="~"
mountpoint="/lmn/media/%(USER)/home"
options="bind"
><not><or><user>root</user><user>ansible</user><user>Debian-gdm</user><user>sddm</user><user>virti</user></or></not>
</volume>
<volume
path="/srv/samba/schools/default-school/share"
mountpoint="/lmn/media/%(USER)/share"
options="bind"
><not><or><user>root</user><user>ansible</user><user>Debian-gdm</user><user>sddm</user><user>virti</user></or></not>
</volume>
insertafter: "<!-- Volume definitions -->"