Implement WLAN access.
This commit is contained in:
parent
fd4c55ffea
commit
668eca6585
3 changed files with 47 additions and 57 deletions
|
@ -1,4 +1,4 @@
|
|||
## This playbook deploys a KDE desktop machine for LinuxMuster.
|
||||
## This playbook deploys a KDE laptop machine for LinuxMuster.
|
||||
---
|
||||
- name: apply configuration to the machines
|
||||
hosts: all
|
||||
|
@ -35,6 +35,7 @@
|
|||
mirror_msfonts: http://livebox.pn.steinbeis.schule/mscorefonts/
|
||||
|
||||
rsyncsecret: Muster!
|
||||
wifipasswd: FjgmGBaKEenr25ZF
|
||||
keys2deploy:
|
||||
- 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKOY0hChWaCDtuiuQcM0v4/u1499esjTtnMjl4uYlnS0 andi@netboot'
|
||||
- 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAN5ylqP936MPjGNxzrzV5jMwIfMhKJdOGuVh3xGQKTM andi@yogi'
|
||||
|
@ -66,60 +67,5 @@
|
|||
- lmn_vm
|
||||
- lmn_printer
|
||||
- kerberize
|
||||
- lmn_wlan
|
||||
- lmn_security
|
||||
|
||||
tasks:
|
||||
- name: Add local user 'virti' in the 'libvirt' group
|
||||
ansible.builtin.user:
|
||||
name: virti
|
||||
password: $y$j9T$DuSvAO63v5LvoJmJ1rB0B0$D4tovIz79AdLHs5I6tYa7rxr3SWknQeUFvGaaKvUpo3
|
||||
comment: Libvirt VM User,,,
|
||||
shell: /bin/bash
|
||||
groups: libvirt
|
||||
append: yes
|
||||
when: false
|
||||
|
||||
- name: Fix 8086:4909 external graphics card
|
||||
replace:
|
||||
dest: "/etc/default/grub"
|
||||
regexp: 'GRUB_CMDLINE_LINUX=""$'
|
||||
replace: 'GRUB_CMDLINE_LINUX="i915.force_probe=4909"'
|
||||
notify: Run update-grub
|
||||
when: ansible_board_vendor == "LENOVO" and ansible_board_name == "32CB"
|
||||
|
||||
- name: Fix sound on 312A
|
||||
replace:
|
||||
dest: "/etc/default/grub"
|
||||
regexp: 'GRUB_CMDLINE_LINUX="snd-intel-dspcfg.dsp_driver=1"$'
|
||||
replace: 'GRUB_CMDLINE_LINUX=""'
|
||||
notify: Run update-grub
|
||||
when: ansible_board_vendor == "LENOVO" and ansible_board_name == "312A"
|
||||
|
||||
- name: Fix sound on 312A and 312D
|
||||
apt:
|
||||
name: firmware-sof-signed
|
||||
state: latest
|
||||
when: >
|
||||
ansible_board_vendor == "LENOVO" and
|
||||
(ansible_board_name == "312D" or ansible_board_name == "312A")
|
||||
|
||||
## bullseye fixes:
|
||||
- name: add bookworm firmware repository if needed
|
||||
apt_repository:
|
||||
repo: deb http://deb.debian.org/debian/ bookworm non-free-firmware
|
||||
state: present
|
||||
update_cache: true
|
||||
when: >
|
||||
ansible_board_vendor == "LENOVO" and
|
||||
ansible_board_name == "32CB" and
|
||||
ansible_distribution_release == "bullseye"
|
||||
|
||||
- name: upgrade non-free-firmware packages
|
||||
apt:
|
||||
upgrade: true
|
||||
autoremove: true
|
||||
autoclean: true
|
||||
when: >
|
||||
ansible_board_vendor == "LENOVO" and
|
||||
ansible_board_name == "32CB" and
|
||||
ansible_distribution_release == "bullseye"
|
||||
|
|
23
roles/lmn_wlan/tasks/main.yml
Normal file
23
roles/lmn_wlan/tasks/main.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
## Make sure to use an initrd providing firmware:
|
||||
## wget https://cdimage.debian.org/cdimage/firmware/testing/current/firmware.cpio.gz
|
||||
## cat initrd.gz firmware.cpio.gz > initrd-fw.gz
|
||||
---
|
||||
- name: Configure WLAN for devices
|
||||
community.general.nmcli:
|
||||
conn_name: FVS-devices
|
||||
type: wifi
|
||||
ssid: FVS-devices
|
||||
ifname: "{{ ansible_interfaces | select('search', 'wl.+') | first }}"
|
||||
wifi_sec:
|
||||
key-mgmt: wpa-psk
|
||||
psk: "{{ wifipasswd }}"
|
||||
autoconnect: true
|
||||
state: present
|
||||
when: not run_in_installer|default(false)|bool
|
||||
|
||||
- name: Provide WLAN config during installation
|
||||
template:
|
||||
src: FVS-devices.nmconnection.j2
|
||||
dest: /etc/NetworkManager/system-connections/FVS-devices.nmconnection
|
||||
mode: '0600'
|
||||
when: run_in_installer|default(false)|bool
|
21
roles/lmn_wlan/templates/FVS-devices.nmconnection.j2
Normal file
21
roles/lmn_wlan/templates/FVS-devices.nmconnection.j2
Normal file
|
@ -0,0 +1,21 @@
|
|||
[connection]
|
||||
id=FVS-devices
|
||||
type=wifi
|
||||
interface-name={{ ansible_interfaces | select('search', 'wl.+') | first }}
|
||||
|
||||
[wifi]
|
||||
mode=infrastructure
|
||||
ssid=FVS-devices
|
||||
|
||||
[wifi-security]
|
||||
key-mgmt=wpa-psk
|
||||
psk={{ wifipasswd }}
|
||||
|
||||
[ipv4]
|
||||
method=auto
|
||||
|
||||
[ipv6]
|
||||
addr-gen-mode=default
|
||||
method=auto
|
||||
|
||||
[proxy]
|
Loading…
Add table
Reference in a new issue