Some more cleanup after logout.
This commit is contained in:
parent
0532ed1e17
commit
0828e77e7b
2 changed files with 16 additions and 9 deletions
|
@ -6,7 +6,7 @@
|
||||||
become: yes
|
become: yes
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- pause:
|
- pause:
|
||||||
prompt: "Enter global-admin active directory password to join domain:"
|
prompt: "Enter global-admin active directory password, leave empty to skip domain join"
|
||||||
minutes: 5
|
minutes: 5
|
||||||
echo: false
|
echo: false
|
||||||
register: adpw
|
register: adpw
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
---
|
---
|
||||||
- name: install needed packages
|
- name: Install needed packages
|
||||||
apt:
|
apt:
|
||||||
name:
|
name:
|
||||||
- libpam-mount
|
- libpam-mount
|
||||||
- cifs-utils
|
- cifs-utils
|
||||||
- nfs-common
|
- nfs-common
|
||||||
|
- hxtools
|
||||||
state: latest
|
state: latest
|
||||||
|
|
||||||
- name: configure pam_mount
|
- name: Configure pam_mount
|
||||||
blockinfile:
|
blockinfile:
|
||||||
dest: /etc/security/pam_mount.conf.xml
|
dest: /etc/security/pam_mount.conf.xml
|
||||||
block: |
|
block: |
|
||||||
|
@ -20,6 +21,18 @@
|
||||||
><not><or><user>root</user><user>ansible</user><user>Debian-gdm</user><user>sddm</user><user>virti</user></or></not></volume>
|
><not><or><user>root</user><user>ansible</user><user>Debian-gdm</user><user>sddm</user><user>virti</user></or></not></volume>
|
||||||
insertafter: "<!-- Volume definitions -->"
|
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
|
- name: Mount NFSv4 home directory
|
||||||
ansible.posix.mount:
|
ansible.posix.mount:
|
||||||
src: server:/default-school
|
src: server:/default-school
|
||||||
|
@ -27,9 +40,3 @@
|
||||||
opts: sec=krb5p,_netdev,x-systemd.automount,x-systemd.idle-timeout=60
|
opts: sec=krb5p,_netdev,x-systemd.automount,x-systemd.idle-timeout=60
|
||||||
state: present
|
state: present
|
||||||
fstype: nfs4
|
fstype: nfs4
|
||||||
|
|
||||||
- name: Kill all user processes on logout
|
|
||||||
ansible.builtin.lineinfile:
|
|
||||||
path: /etc/systemd/logind.conf
|
|
||||||
line: KillUserProcesses=yes
|
|
||||||
insertafter: '#KillUserProcesses=no'
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue