This repository has been archived on 2024-02-16. You can view files and clone it, but cannot push or open issues or pull requests.
sysconfig/roles/networking/tasks/iwd.yml

32 lines
812 B
YAML
Raw Normal View History

2022-01-14 19:46:59 +01:00
---
- name: networking | Install iwd package
community.general.apk:
2022-01-14 19:46:59 +01:00
name: iwd
state: present
2022-11-20 13:05:41 +01:00
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.apk:
2022-11-20 13:05:41 +01:00
name: eiwd, iw
state: present
when: iwd_without_dbus
2022-01-14 19:46:59 +01:00
- name: networking | Copy iwd configuration
2022-01-14 19:46:59 +01:00
copy:
src: iwd/main.conf
2022-01-14 19:46:59 +01:00
dest: /etc/iwd/main.conf
owner: root
group: root
mode: '644'
2022-01-14 19:46:59 +01:00
- name: networking | Start iwd service on runlevel 'boot'
2022-11-20 13:05:41 +01:00
vars:
iwd_service: '{{ iwd_without_dbus | ternary("eiwd", "iwd") }}'
2022-01-14 19:46:59 +01:00
service:
2022-11-20 13:05:41 +01:00
name: '{{ iwd_service }}'
runlevel: default
enabled: true