Unify bind mounts for localhome and non-localhome devices
This commit is contained in:
parent
5b19a529f2
commit
1018912703
2 changed files with 6 additions and 8 deletions
|
@ -205,6 +205,12 @@
|
||||||
</volume>
|
</volume>
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
|
- name: Remove pam_mount for VM bind mounts
|
||||||
|
ansible.builtin.blockinfile:
|
||||||
|
dest: /etc/security/pam_mount.conf.xml
|
||||||
|
marker: "<!-- {mark} ANSIBLE MANAGED BLOCK (bind mount school for VMs) -->"
|
||||||
|
state: absent
|
||||||
|
|
||||||
- name: Check if rmlpr.timer is installed
|
- name: Check if rmlpr.timer is installed
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: /etc/systemd/system/rmlpr.timer
|
path: /etc/systemd/system/rmlpr.timer
|
||||||
|
|
|
@ -45,13 +45,6 @@
|
||||||
options="bind"
|
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>
|
><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>
|
||||||
insertafter: "<!-- END ANSIBLE MANAGED BLOCK .* -->"
|
|
||||||
|
|
||||||
- name: Configure pam_mount for VM bind mounts
|
|
||||||
ansible.builtin.blockinfile:
|
|
||||||
dest: /etc/security/pam_mount.conf.xml
|
|
||||||
marker: "<!-- {mark} ANSIBLE MANAGED BLOCK (bind mount school for VMs) -->"
|
|
||||||
block: |
|
|
||||||
<volume
|
<volume
|
||||||
path="/srv/samba/schools/default-school"
|
path="/srv/samba/schools/default-school"
|
||||||
mountpoint="/lmn/media/%(USER)/school"
|
mountpoint="/lmn/media/%(USER)/school"
|
||||||
|
@ -59,7 +52,6 @@
|
||||||
><not><or><user>root</user><user>ansible</user><user>Debian-gdm</user><user>sddm</user>{% if localuser %}<user>{{ localuser }}</user>{% endif %}</or></not>
|
><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>
|
||||||
insertafter: "<!-- END ANSIBLE MANAGED BLOCK .* -->"
|
insertafter: "<!-- END ANSIBLE MANAGED BLOCK .* -->"
|
||||||
when: localhome is defined and localhome
|
|
||||||
|
|
||||||
- name: Use umount script for proper cleanup
|
- name: Use umount script for proper cleanup
|
||||||
ansible.builtin.blockinfile:
|
ansible.builtin.blockinfile:
|
||||||
|
|
Loading…
Add table
Reference in a new issue