[15:22] hello all I am migrating some systems from ubuntu 20 to ubuntu 22 and the way network-manager / netplan are behaving is very different and is causing me issue. [15:22] nmcli con add type wifi con-name hq-wifi ifname wlan0 ssid "{{vault_nmcli_hq_ssid}}" used to create this file /etc/NetworkManager/system-connections/hq-wifi.nmconnection [15:22] however on ubuntu 22 i do not have any files in /etc/NetworkManager/system-connections/ anymore [15:22] however I do see files under /etc/netplan/ but they are sorted by some UUID and everytime I run nmcli con add type wifi con-name hq-wifi it creates a new file with UUID [15:22] causing me to have many config files for the same network name [15:22] I am looking for a way to know if nmcli con add type wifi con-name hq-wifi has been created without the use of any uuid if possible [15:23] Is there a way change some config file so files are stored under /etc/NetworkManager/system-connections/  again? [15:25] or is there a way to use nmcli con add type wifi con-name hq-wifi ifname wlan0 ssid and have config file under /etc/netplan/ that matches the con-name instead of generating a new file with an uuid, i now got a few hundred uuid config files all for the same wifi network. === tuxcrafter58 is now known as tuxcrafter [15:29] tuxcrafter: I guess you could you "nmcli con show hq-wifi", which will error out if that connection-profile does not exist [15:30] alternatively, check the connection profiles generated by Netplan in /run/NetworkManager/sytem-connections. but I think those would also contain the UUID in the file name. In addition to the SSID [15:30] # nmcli con show hq-wifi | wc -l [15:30] 5359 [15:30] Isn't it a bug that the same connection can have multiple uuids? [15:32] ls -hal /run/NetworkManager/system-connections/ all those files are based on an UUID not on the nmcli con-name [15:32] they can have the same name but not uuids, as far as I know [15:32] I could not see the option to use nmcli con add with an UUID instead of the con-name, is there an option I am missing there? [15:32] so you create connections but never delete them? [15:34] how did you delete connections before? By deleting them from /etc/NetworkManager/system-connections? [15:35] it used to be that con-name corresponded to a config file, so I would check for /etc/NetworkManager/system-connections/hq-wifi.nmconnection but this does not work anymore [15:35] unless there is an option to revert back to this behaviour that I am missing. [15:40] as slyon said, you can check it with "nmcli con show hq-wifi" or look for a file with "hq-wifi" in its name in /run/NetworkManager/sytem-connections. But you need to delete the old files first now. [15:41] if you want to drop all the connections quickly you can delete /etc/netplan/90-NM-* and run netplan apply [15:42] and now you need to delete the connection after finishing your tests with "nmcli con del hq-wifi" [15:43] I guess you could also call `nmcli con del hq-wifi` to have all connection profiles with that name be deleted. [15:44] btw: There's no way to revert back to /etc/NetworkManager/system-connections/*.nmconnection profiles. Netplan was chosen to be the single source of network configuration, as found in /etc/netplan/ [15:45] Okay so the only way is to use nmcli con show hq-wifi to check if the connection exist [15:45] no more reliable way to check through the file system [15:59] you could "sudo netplan get | yq" and filter/process that as needed through yq, or any other YAML processing logic. But that might be overkill, given the `nmcli` commands from above.