Commit graph

738 commits

Author SHA1 Message Date
Raphael Dannecker
88e650aae7 Improve documentation 2025-03-26 14:51:31 +01:00
Raphael Dannecker
1018912703 Unify bind mounts for localhome and non-localhome devices 2025-03-26 14:49:31 +01:00
Raphael Dannecker
5b19a529f2 Collect some general tasks from other roles into role_misc
Control execution of task by variables with defaults.
2025-03-26 14:44:19 +01:00
Raphael Dannecker
a8736395c8 Enable wlan on boot by variable instead of membership in group teacherlaptop 2025-03-26 12:14:02 +01:00
Raphael Dannecker
5092969c8e Set default to (non)-mounting home as nfs
Set `nfs4=false` in defaults (lmn_mount) instead of lmn-client.yml
2025-03-26 07:22:22 +01:00
Raphael Dannecker
2602189911 Control execution of localuser by variable instead of group-membership 2025-03-25 09:14:47 +01:00
Raphael Dannecker
a98617f9ca Add documentation for custome_roles 2025-03-25 07:29:13 +01:00
Raphael Dannecker
05844989eb Prevent playbook abort if variables are not defined
- Skip task `Deploy sudo configurations` when `sudo_permissions` is not defined
- Skip task `Deploy polkit configurations` when `polkit_rules` is not defined
2025-03-24 14:23:14 +01:00
Raphael Dannecker
91ab4d3511 Implement the custom role concept
- Custom Ansible roles can be stored in the `roles/custom` directory
- The list `custom_roles` determines which roles are included
2025-03-24 14:09:18 +01:00
Finn Hercke
a1149945da Remove obsolete role lmn_networkd 2025-03-24 12:16:56 +01:00
Finn Hercke
c4e35584bc Remove role lmn_teacherlaptop and extend role lmn_security
- Add variable to configure sudo-program permissions (`sudo_permissions`)
- Add variable to configure polkit-rules (`polkit_rules`)
- Migrate sudo and polkit permissions from lmn_teacherlaptop role to inventory
2025-03-24 12:14:48 +01:00
Finn Hercke
c00d5566dd Move extrapackage installation into separate role and make it more flexible
- Introduce `extra_pkgs1` - `extra_pkgs10`
- Introduce `extra_pkgs_bpo1` - `extra_pkgs_bpo10`
- Move package-list from lmn_teacherlaptop into inventory as extra_pkgs1
2025-03-24 10:30:32 +01:00
Finn Hercke
4dafbd8b85 Move migration from IWD to WPA-supplicant to role
To ensure that migration only runs when EAP-TLS certificate is installed correctly
2025-03-24 08:56:01 +01:00
Raphael Dannecker
f965f4466c Improve ansible code so that ansibe-lint shows fewer errors 2025-03-24 07:33:56 +01:00
Raphael Dannecker
e8ef744f59 Provide documenation 2025-03-20 21:17:22 +01:00
Raphael Dannecker
f1cb7486a5 Refactor lmn_vpn role
- Separate `lmn_vpn` from `lmn_teacherlaptop`.
- Implement a check for the availability of the wireguard-server during the wg-config rollout.
- Enhance variable support with a standardized naming schema:
  - VPN selection via `vpn` variable (`none`, `wg`).
  - Wireguard configuration (endpoint, allowed IPs, ip_cdr, dns, searchpath).
- Run wg-config role in separate play with serial 1 to avoid conflicts, when the role attempts
  to determine the next free Wireguard IP on the server when role try to Add a check to verify if the radius certificate is revoked.
- Ensure required packages and services are only installed and configured if the `vpn` variable is set.
- Provide documentation for `lmn_vpn` module.
2025-03-20 21:13:20 +01:00
Finn Hercke
a68aaeb81c Refactor lmn_wlan role
- Consolidate `lmn_wlan`, `lmn_wlan_nm`, and `lmn_wlan_8021x` into single `lmn_wlan` role.
- Implement a check for the availability of the radius-server during the EAP-TLS rollout.
- Enhance variable support with a standardized naming schema:
    - Mode selection via `wlan` variable (`none`, `psk`, `eap-tls`).
    - EAP-TLS CA configuration (CA information, email address, CA password).
    - Introduce a switch to force the (re-)issue of existing certificates.
    - PSK configuration through `wlan_ssid` and `wlan_password`.
- Add a check to verify if the radius certificate is revoked.
- Ensure required packages and services are only installed and configured if the `wifi` variable is set.
2025-03-20 16:37:04 +01:00
Raphael Dannecker
9f1c60eefd Use variable instead of group membership to install localhome
Use variable localhome to determines whether the localhome module is installed.
Default: localhome=false

Further changes:
- Move pam-exec from common-auth to common-session
- Move pam-mkhomedir before pam-mount to avoid double login on first use
  on localhome devices
2025-03-19 11:08:57 +01:00
Raphael Dannecker
3d01394820 Separate exam-mode stuff in own role 2025-03-18 14:37:13 +01:00
Raphael Dannecker
43157dd810 Restart libvirtd after firewalld.service restart
Starting libvirtd.service provides iptable rules for NATed network virbr0.
When starting firewalld.service after libvirtd, these rules will be
overwritten. So NAT will no longer work. Restart of libvirtd fixes the
rules again.
2025-03-18 12:45:46 +01:00
Finn Hercke
4b982205ba Revoke already issued certificates on re-enroll 2025-03-11 12:49:33 +01:00
Raphael Dannecker
831f453512 Configuring the NFS server using variables is more customizable 2025-03-02 11:12:16 +01:00
Raphael Dannecker
18b2cb8ccf Add TPM support for win11 VMs 2025-02-27 19:21:49 +01:00
Raphael Dannecker
ae393086c7 Add maintenance ssh-keys 2025-02-27 18:44:34 +01:00
Raphael Dannecker
e418ab6189 Add requested packages 2025-02-27 18:39:00 +01:00
Raphael Dannecker
5b4a287cca Direct logout, when mount of server shares failed
Sometimes mounting the server shares fails when logging in (missing
krb5-tickts). On devices with localhome, users can still log in. To
prevent this, users are immediately logged out if the server mounts are
missing.
2025-02-27 18:34:44 +01:00
Raphael Dannecker
677931a483 Use wpa-supplicant instead of iwd as wifi-backend
Iwd as wifi-backend has some disadvantages:
- teachers cannot add wpa-Enterprise connections with the
  networkManager
- gnome-network-displays (miracast) does not work
Switching to wpa-supplicant will solve these problems.
2025-02-27 18:25:17 +01:00
Raphael Dannecker
843289d2c2 Create generic wlan role
When implementing different wlan authentication modes (PSK/802-1x), we
have to separate general wlan stuff in one generic role.
2025-02-27 12:28:21 +01:00
Raphael Dannecker
72340155ed Correct ansible syntax to pass ansible-lint 2025-02-27 12:20:57 +01:00
Finn Hercke
f447d1dca6 Added support for 802-1X wifi-authentification and certificate-rollout on clients 2025-02-24 12:40:33 +01:00
Raphael Dannecker
97b9ba8d97 Shorten path for XDG_CONFIG_HOME and clean dir
In Linux socket paths are limited to 108 char length.
/var/tmp/vm/$UID/.config will be too long in some cases.
So we use /var/tmp/vm/$UID

/var/tmp/vm must be
- cleaned on startup
- created with sticky-bit (used by different users)
2025-02-18 14:16:56 +01:00
Raphael Dannecker
bde276d962 Exit pam_exec script when not running as root
When terminating screen lock, pam_exec is called in the context of the corresponding user.
Non-root users don't have the permission to start/stop firewalld. So exit immediately.
2025-02-14 08:45:37 +01:00
Raphael Dannecker
8b57bef7f8 Add missing file for commit e3396ef 2025-02-05 13:57:07 +01:00
Raphael Dannecker
76c2c38800 Revert "Adjust mmcblk-device gid on teacherlaptops to permit teachers access."
This reverts commit 640f58996c.
2025-02-05 13:22:23 +01:00
Raphael Dannecker
e3396ef06c Start firewalld when -exam user logs in 2025-02-05 13:15:42 +01:00
Raphael Dannecker
6dcbb03601 Allow domain users to write sd-cards 2025-02-05 13:10:56 +01:00
Raphael Dannecker
dfa16402f1 Set default git branch to main 2025-02-03 08:10:09 +01:00
Raphael Dannecker
5998c5900e Trixies uses tmpfs for /tmp, so let's use /var/tmp/vm for temporary VM files 2025-01-27 17:11:12 +01:00
Raphael Dannecker
f4dffc06fc Rename instead of delete -exam media directories (belongs to commit 39da308) 2025-01-27 17:01:03 +01:00
Raphael Dannecker
985e02443c Hardware has changed in some classrooms 2025-01-22 14:45:14 +01:00
Raphael Dannecker
d5f9bb889b Some internet connections need smaller MTU for wireguard 2025-01-22 14:43:16 +01:00
Raphael Dannecker
18cde94846 Mount nfs share for additional programs and data 2025-01-22 14:40:52 +01:00
Raphael Dannecker
a6eadce948 Sync application starters on boot and separate ansible tasks from lmn_vm role 2025-01-22 14:36:38 +01:00
Raphael Dannecker
39da308ff7 Rename instead of delete outdated exam-user directories on localhome-clients
Exam mode don't collect home-directories on localhome clients.
Deleting home of exam-users will result in potential data loss. But keeping
the home under the same name will prevent new exam at the next day.

Solution: Rename home (and /lmn/media/) of user after 12h and delete after 10d.
2025-01-22 09:40:27 +01:00
Raphael Dannecker
727922f152 Prevent autoremove of libreoffice-qt5 (e.g. filepicker) 2025-01-20 15:54:56 +01:00
Raphael Dannecker
9c8a8bdc69 Increase minimum available disk space after downloading a new vm image 2025-01-15 12:22:37 +01:00
Raphael Dannecker
7db755e718 Add alternative git GUI 2025-01-13 13:49:26 +01:00
Raphael Dannecker
6c81e93937 Restore SDDM-Config when the primary screen patch is no longer needed 2025-01-13 13:43:24 +01:00
Raphael Dannecker
352a897d88 Start user-squid-proxy at login so that all programs without kerberos support have proxy access 2025-01-09 12:31:24 +01:00
Raphael Dannecker
f5f3d9557d Add missing file for commit 23a9b6f 2024-12-13 18:40:42 +01:00