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.
This commit is contained in:
Finn Hercke 2025-03-20 16:37:04 +01:00
parent 9f1c60eefd
commit a68aaeb81c
9 changed files with 561 additions and 538 deletions

View file

@ -106,6 +106,11 @@
when: "'teacherlaptop' in group_names"
- role: lmn_exam
when: exam_mode
- role: lmn_wlan
when:
- ansible_interfaces | select('search', 'wl.+') | first is defined
- wlan != none
tasks:
## Temporary fixes and quirks:
@ -354,26 +359,11 @@
become: yes
vars_files: lmn-vault
vars:
wifipasswd: "{{ vault_wifipasswd[ssid] }}"
localuser: "{{ vault_localuser }}"
localuser_pwd: "{{ vault_localuser_pwd }}"
ssid: "{{ vault_ssid }}"
radiusca_password: "{{ vault_radiusca_password }}"
country_name: "{{ vault_country_name }}"
state_or_province_name: "{{ vault_state_or_province_name }}"
locality_name: "{{ vault_locality_name }}"
organization_name: "{{ vault_organization_name }}"
admin_email: "{{ vault_admin_email }}"
roles:
- role: lmn_localuser
when: "'teacherlaptop' not in group_names"
- role: lmn_wlan
- role: lmn_wlan_8021x
when: ansible_interfaces | select('search', 'wl.+') | first is defined
tags:
- never
- wlan_8021x
tasks:
- name: Remove deprecated files and directories (laptop-class)
file: