Make playbook more general: Split into general and specific roles, use variables.
This commit is contained in:
parent
c59fb67ed0
commit
431acebfa3
13 changed files with 247 additions and 144 deletions
|
@ -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 home) -->"
|
||||
block: |
|
||||
<!-- mounts for home and nextcloud -->
|
||||
<volume
|
||||
fstype="cifs"
|
||||
server="{{ smb_server }}"
|
||||
|
@ -23,13 +37,6 @@
|
|||
options="sec=krb5i,cruid=%(USERUID),user=%(USER),gid=1010,file_mode=0770,dir_mode=0770,mfsymlinks,nobrl"
|
||||
><not><or><user>root</user><user>ansible</user><user>Debian-gdm</user><user>sddm</user><user>virti</user></or></not>
|
||||
</volume>
|
||||
<volume
|
||||
fstype="davfs"
|
||||
path="https://nc.steinbeis.schule/remote.php/dav/files/%(USER)"
|
||||
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 -->"
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue