Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ansible provisionner plugin and nmcli module #319

Open
fguiet opened this issue Nov 27, 2023 · 0 comments
Open

Ansible provisionner plugin and nmcli module #319

fguiet opened this issue Nov 27, 2023 · 0 comments

Comments

@fguiet
Copy link

fguiet commented Nov 27, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant