lmn-client/roles/lmn_wlan/tasks/wpa-psk.yaml
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

25 lines
821 B
YAML

---
# WPA-PSK - Configure SSID on client
- name: Configure WLAN for devices
community.general.nmcli:
conn_name: "{{ wlan_ssid }}"
type: wifi
ssid: "{{ wlan_ssid }}"
ifname: "{{ ansible_interfaces | select('search', 'wl.+') | first }}"
wifi_sec:
key-mgmt: wpa-psk
psk: "{{ wlan_password }}"
autoconnect: true
state: present
when: |
not run_in_installer|default(false)|bool and
ansible_interfaces | select('search', 'wl.+') | first is defined
- name: Provide WLAN config during installation
ansible.builtin.template:
src: ssid.nmconnection.j2
dest: "/etc/NetworkManager/system-connections/{{ wlan_ssid }}.nmconnection"
mode: '0600'
when: |
run_in_installer|default(false)|bool and
ansible_interfaces | select('search', 'wl.+') | first is defined