--- - name: networking | Install iwd package community.general.apk: name: iwd state: present when: not iwd_without_dbus # NOTE: connmanctl can't scan wifi with eiwd so we need iw # - iw dev scan | grep SSID # - printf | iwd_passphrase > /var/lib/iwd/.psk - name: networking | Install eiwd and iw packages community.general.apk: name: eiwd, iw state: present when: iwd_without_dbus - name: networking | Copy iwd configuration copy: src: iwd/main.conf dest: /etc/iwd/main.conf owner: root group: root mode: '644' - name: networking | Start iwd service on runlevel 'boot' vars: iwd_service: '{{ iwd_without_dbus | ternary("eiwd", "iwd") }}' service: name: '{{ iwd_service }}' runlevel: default enabled: true