Configure KDE, move package installation to extra role.
This commit is contained in:
parent
0828e77e7b
commit
0cc41715d8
8 changed files with 87 additions and 35 deletions
2
roles/lmn_mount/defaults/main.yml
Normal file
2
roles/lmn_mount/defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
smb_server: "server"
|
||||
smb_share: "default-school/share/"
|
42
roles/lmn_mount/tasks/main.yml
Normal file
42
roles/lmn_mount/tasks/main.yml
Normal file
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
- name: Install needed packages
|
||||
apt:
|
||||
name:
|
||||
- libpam-mount
|
||||
- cifs-utils
|
||||
- nfs-common
|
||||
- hxtools
|
||||
state: latest
|
||||
|
||||
- name: Configure pam_mount
|
||||
blockinfile:
|
||||
dest: /etc/security/pam_mount.conf.xml
|
||||
block: |
|
||||
<volume
|
||||
fstype="cifs"
|
||||
server="{{ smb_server }}"
|
||||
path="{{ smb_share }}"
|
||||
mountpoint="/media/%(DOMAIN_USER)/share"
|
||||
options="sec=krb5i,cruid=%(USERUID),user=%(USER)"
|
||||
><not><or><user>root</user><user>ansible</user><user>Debian-gdm</user><user>sddm</user><user>virti</user></or></not></volume>
|
||||
insertafter: "<!-- Volume definitions -->"
|
||||
|
||||
- name: Clean up all user processes after logout
|
||||
ansible.builtin.replace:
|
||||
path: /etc/security/pam_mount.conf.xml
|
||||
regexp: '^(<logout wait="0" hup="no" term="no" kill="no" />)$'
|
||||
replace: '#\1\n<logout wait="1000" hup="yes" term="yes" kill="yes" />'
|
||||
|
||||
- name: Kill all user processes on logout
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/systemd/logind.conf
|
||||
line: KillUserProcesses=yes
|
||||
insertafter: '#KillUserProcesses=no'
|
||||
|
||||
- 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
|
Loading…
Add table
Add a link
Reference in a new issue