mkaczanowski / packer-builder-arm

Packer plugin to build ARM images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ansible provisionner plugin and nmcli module

fguiet opened this issue · comments

With Debian bookworm, WiFi connexion should be configured using nmcli (Network Manager CLI)

I tried to use the following Ansible task but I got the error below

#- name: Configure WiFi Connexion
# become: true
# community.general.nmcli:
# state: present
# conn_name: "{{ RASPBERRY_CONFIG.WIFI_SSID }}"
# dns4:
# - "{{ RASPBERRY_CONFIG.DNS }}"
# ifname: wlan0
# ssid: "{{ RASPBERRY_CONFIG.WIFI_SSID }}"
# wifi_sec:
# key-mgmt: wpa-psk
# psk: "{{ RASPBERRY_CONFIG.WIFI_PASSWORD }}"
# autoconnect: true
# type: wifi
# ip4: "{{ RASPBERRY_CONFIG.WIFI_IP }}"
# gw4: "{{ RASPBERRY_CONFIG.ROUTER }}"

Error: Could not create NMClient object: Could not connect

I ended up writing my own connexion file under folder /etc/NetworkManager/system-connections/

Any idea how to fix this issue as I think using ncli ansible module is a better choice