Bind mounts are no longer required; removing them
This commit is contained in:
parent
58418bf48f
commit
3ff8d48827
1 changed files with 13 additions and 39 deletions
|
@ -28,46 +28,20 @@
|
|||
# insertafter: '#auth_unix_rw = "polkit"'
|
||||
# notify: reload libvirtd
|
||||
|
||||
- name: Configure pam_mount for VM bind mounts
|
||||
ansible.builtin.blockinfile:
|
||||
dest: /etc/security/pam_mount.conf.xml
|
||||
marker: "<!-- {mark} ANSIBLE MANAGED BLOCK (bind mounts for VMs) -->"
|
||||
block: |
|
||||
<!-- 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>{% if localuser %}<user>{{ localuser }}</user>{% endif %}</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>{% if localuser %}<user>{{ localuser }}</user>{% endif %}</or></not>
|
||||
</volume>
|
||||
<volume
|
||||
path="/srv/samba/schools/default-school"
|
||||
mountpoint="/lmn/media/%(USER)/school"
|
||||
options="bind"
|
||||
><not><or><user>root</user><user>ansible</user><user>Debian-gdm</user><user>sddm</user>{% if localuser %}<user>{{ localuser }}</user>{% endif %}</or></not>
|
||||
</volume>
|
||||
insertafter: "<!-- END ANSIBLE MANAGED BLOCK .* -->"
|
||||
# - name: Use umount script for proper cleanup
|
||||
# ansible.builtin.blockinfile:
|
||||
# dest: /etc/security/pam_mount.conf.xml
|
||||
# marker: "<!-- {mark} ANSIBLE MANAGED BLOCK (umount script needed for bind mounts ordering) -->"
|
||||
# block: |
|
||||
# <!-- Provide special umount script here to handle bind mounts and proper ordering -->
|
||||
# <umount>/usr/local/sbin/pam-umount.sh %(USER) %(USERUID) %(MNTPT)</umount>
|
||||
# insertafter: '^<mntoptions.*'
|
||||
|
||||
- name: Use umount script for proper cleanup
|
||||
ansible.builtin.blockinfile:
|
||||
dest: /etc/security/pam_mount.conf.xml
|
||||
marker: "<!-- {mark} ANSIBLE MANAGED BLOCK (umount script needed for bind mounts ordering) -->"
|
||||
block: |
|
||||
<!-- Provide special umount script here to handle bind mounts and proper ordering -->
|
||||
<umount>/usr/local/sbin/pam-umount.sh %(USER) %(USERUID) %(MNTPT)</umount>
|
||||
insertafter: '^<mntoptions.*'
|
||||
|
||||
- name: Prepare umount script
|
||||
ansible.builtin.copy:
|
||||
src: pam-umount.sh
|
||||
dest: /usr/local/sbin/pam-umount.sh
|
||||
mode: '0755'
|
||||
# - name: Prepare umount script
|
||||
# ansible.builtin.copy:
|
||||
# src: pam-umount.sh
|
||||
# dest: /usr/local/sbin/pam-umount.sh
|
||||
# mode: '0755'
|
||||
|
||||
- name: Insert domain in default-network
|
||||
ansible.builtin.lineinfile:
|
||||
|
|
Loading…
Add table
Reference in a new issue