Commit graph

704 commits

Author SHA1 Message Date
Raphael Dannecker
6c8d1b1f28 Fix: String in when condition must be enclosed in quotes 2025-04-02 13:58:15 +02:00
Raphael Dannecker
513d29d628 Add an option to force logout if the home on server fails to mount 2025-04-02 13:55:10 +02:00
Raphael Dannecker
e5bf6054fe Add links to firefox bookmarks 2025-04-02 13:48:53 +02:00
Raphael Dannecker
89fa704ea2 Mounthome is no longer required 2025-04-01 15:52:11 +02:00
Raphael Dannecker
0f4e455717 Use vm_torrent_srv to configure the torrent server 2025-04-01 15:45:11 +02:00
Raphael Dannecker
320ad3a51d Use wlan_eap_ca_crl for URL of the certificate revocation list 2025-04-01 15:31:19 +02:00
Raphael Dannecker
f6b77c64cf Use kerberize_uris for chromium AuthServerAllowlist too 2025-04-01 15:09:25 +02:00
Raphael Dannecker
333b57cd8b Add a switch to remove plasma-discover and thus prevent update notifications 2025-03-31 20:40:03 +02:00
Raphael Dannecker
3615ef241c Move 'Fix primary screen' task to role 2025-03-31 20:18:47 +02:00
Raphael Dannecker
ce40cb885f Create own role for the usersquid http_proxy functionality 2025-03-31 18:13:50 +02:00
Raphael Dannecker
68215897a6 Move 'pwroff on idle' task to role 2025-03-31 14:37:42 +02:00
Raphael Dannecker
6ba24ade09 Add missing files for a8e4130 2025-03-29 11:25:22 +01:00
Raphael Dannecker
e52c01615c Define variable for additional printer admin group
Add a new variable `printer_admin_group` to specify additional CUPS admin group.
When set to `role-teacher`, teachers will have the ability to add and remove printers.
2025-03-29 11:12:46 +01:00
Raphael Dannecker
aa990c388b Install unattended-upgrades before changing the corresponding config 2025-03-29 09:43:31 +01:00
Raphael Dannecker
7eb8fa62d1 Rescue task should always report status changed 2025-03-28 12:02:35 +01:00
Raphael Dannecker
d9cd758b8e Define list for additional desktop packages
Packages listed in `kde_desktop_pkg` will be installed in role `lmn_kde`.
2025-03-28 11:38:09 +01:00
Raphael Dannecker
ec3dd70a59 Allow teachers on teacherlaptops to install untrusted packages 2025-03-28 11:32:10 +01:00
Raphael Dannecker
a8e4130aa8 Create final task including lmn_finish and lmn_tmpfixes
lmn_tmpfixes is used for:
- temporary fixes and quirks
- cleaning up stuff from obsolete/erroneous tasks

lmn_finish is used for:
- installing extra_pkg
- setting ansible-stamps
2025-03-28 07:27:39 +01:00
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