2 - name: check if wifi-connection(-file) exists
4 path: /etc/NetworkManager/system-connections/SchulWLAN.nmconnection
6 - name: connect device to internal wifi "schulnetz"
8 - name: add hidden wifi
9 command: nmcli connection add type wifi con-name SchulWLAN ifname {{ wifi_ifname }} ssid {{ wlan-ssid }}
10 - name: modify wifi password
11 command: nmcli connection modify SchulWLAN wifi-sec.key-mgmt wpa-psk wifi-sec.psk "{{ wlan-pw }}"
12 - name: autoconnect wifi
13 command: nmcli connection modify SchulWLAN connection.autoconnect yes
14 - name: modify wifi hidden
15 command: nmcli connection modify SchulWLAN 802-11-wireless.hidden yes
17 command: nmcli connection up SchulWLAN
18 when: not stat_result.stat.exists and ("notebooks" in group_names)