From: Ullli Date: Wed, 24 May 2023 16:00:00 +0000 (+0200) Subject: SchulWLAN für alle Devices konfigurieren X-Git-Url: https://freie-schul-it.de/gitweb/fsit-cmgt.git/commitdiff_plain/acbd76a5312d9f700f2eebfa1ac6580b4aea74bb?ds=inline;hp=fe1a09dd8a8f71d57a4e7829c9661159a2383029 SchulWLAN für alle Devices konfigurieren --- diff --git a/library/wifi-for-notebooks.yml b/library/wifi-for-notebooks.yml new file mode 100644 index 0000000..b1492ca --- /dev/null +++ b/library/wifi-for-notebooks.yml @@ -0,0 +1,19 @@ +--- +- name: check if wifi-connection(-file) exists + stat: + path: /etc/NetworkManager/system-connections/SchulWLAN.nmconnection + register: stat_result +- name: connect device to internal wifi "schulnetz" + block: + - name: add hidden wifi + command: nmcli connection add type wifi con-name SchulWLAN ifname {{ wifi_ifname }} ssid {{ wlan-ssid }} + - name: modify wifi password + command: nmcli connection modify SchulWLAN wifi-sec.key-mgmt wpa-psk wifi-sec.psk "{{ wlan-pw }}" + - name: autoconnect wifi + command: nmcli connection modify SchulWLAN connection.autoconnect yes + - name: modify wifi hidden + command: nmcli connection modify SchulWLAN 802-11-wireless.hidden yes + - name: connect wifi + command: nmcli connection up SchulWLAN + when: not stat_result.stat.exists and ("notebooks" in group_names) +...