networking: suport both iwd and eiwd
This commit is contained in:
parent
72f10a2bdc
commit
330418490d
|
@ -103,6 +103,9 @@ libvirt_daemons:
|
|||
- virtqemud
|
||||
- virtstoraged
|
||||
|
||||
# Whether to use `iwd` or `eiwd`
|
||||
iwd_without_dbus: false
|
||||
|
||||
# Public facing network interfaces to configured
|
||||
# (don't include wireless interfaces here as they should use dhcp with iwctl)
|
||||
# https://wiki.alpinelinux.org/wiki/Configure_Networking
|
||||
|
|
|
@ -3,6 +3,16 @@
|
|||
community.general.packaging.os.apk:
|
||||
name: iwd
|
||||
state: present
|
||||
when: not iwd_without_dbus
|
||||
|
||||
# NOTE: connmanctl can't scan wifi with eiwd so we need iw
|
||||
# - iw dev <interface> scan | grep SSID
|
||||
# - printf <passphrase> | iwd_passphrase <ssid> > /var/lib/iwd/<ssid>.psk
|
||||
- name: networking | Install eiwd and iw packages
|
||||
community.general.packaging.os.apk:
|
||||
name: eiwd, iw
|
||||
state: present
|
||||
when: iwd_without_dbus
|
||||
|
||||
- name: networking | Copy configuration
|
||||
copy:
|
||||
|
@ -13,8 +23,10 @@
|
|||
mode: 0644
|
||||
|
||||
- name: networking | Start iwd service on runlevel 'default'
|
||||
vars:
|
||||
iwd_service: '{{ iwd_without_dbus | ternary("eiwd", "iwd") }}'
|
||||
service:
|
||||
name: iwd
|
||||
name: '{{ iwd_service }}'
|
||||
runlevel: default
|
||||
enabled: true
|
||||
state: started
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
- name: networking | Configure /etc/netconfig/interfaces
|
||||
- name: networking | Configure /etc/network/interfaces
|
||||
template:
|
||||
src: interfaces.j2
|
||||
dest: /etc/network/interfaces
|
||||
|
|
Reference in New Issue