Test mit geänderten Variablen

This commit is contained in:
Frank Schiebel 2023-09-05 17:02:39 +02:00
parent ac805d4af9
commit bbf2f78e95
13 changed files with 87 additions and 606 deletions

View file

@ -9,12 +9,26 @@
- davfs2
state: latest
- name: Configure pam_mount for Webdav Nextcloud
blockinfile:
dest: /etc/security/pam_mount.conf.xml
marker: "<!-- {mark} ANSIBLE MANAGED BLOCK (mount Nextcloud) -->"
block: |
<volume
fstype="davfs"
path="{{ web_dav }}"
mountpoint="/lmn/media/%(USER)/nextcloud"
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>
insertafter: "<!-- Volume definitions -->"
when: web_dav is defined and web_dav | length > 0
- name: Configure pam_mount for LMN homes
blockinfile:
dest: /etc/security/pam_mount.conf.xml
marker: "<!-- {mark} ANSIBLE MANAGED BLOCK (mount LMN homes) -->"
marker: "<!-- {mark} ANSIBLE MANAGED BLOCK (mount LMN home) -->"
block: |
<!-- mounts for home, share and nextcloud -->
<volume
fstype="cifs"
server="{{ smb_server }}"
@ -64,7 +78,7 @@
line: KillUserProcesses=yes
insertafter: '#KillUserProcesses=no'
- name: Bind mount lmn/media with nosuid directory
- name: Bind mount /lmn/media with nosuid directory
ansible.posix.mount:
src: /lmn/media
path: /lmn/media
@ -72,11 +86,11 @@
state: present
fstype: none
#- name: Mount NFSv4 home directory
# ansible.posix.mount:
# src: server:/default-school
# path: /srv/samba/schools/default-school
# opts: sec=krb5p,_netdev,x-systemd.automount,x-systemd.idle-timeout=60
# state: present
# fstype: nfs4
# when: nfs4
- name: Mount NFSv4 home directory
ansible.posix.mount:
src: server:/default-school
path: /srv/samba/schools/default-school
opts: sec=krb5p,_netdev,x-systemd.automount,x-systemd.idle-timeout=60
state: present
fstype: nfs4
when: nfs4