/srv/irclogs.ubuntu.com/2020/11/25/#netplan.txt

slyonHybrid512: macvlan is currently not supported, feature request pending here: https://bugs.launchpad.net/netplan/+bug/166484707:13
syocI see that "netplan try" uses return code 0 even if it fails to apply the config? Are there any tricks to do an automatic sanity check for a netplan config?10:57
slyonsyoc: You should be able to call "/lib/netplan/generate ./your-config.yaml", this will try to parse the config and show any parsing errors. Call this as non-root (without sudo), so it cannot actually write/generate any config files.11:01
slyonthis is not an officially supported way, but should work.11:01
syocslyon thanks a bunch!11:08
syocwell it errors out on a faulty config, but it also errors out on a correct config when I'm not using sudo (which makes complete sense). Was looking for something to use in conjunction with https://docs.ansible.com/ansible/latest/collections/ansible/builtin/template_module.html#parameter-validate11:11
syocso it needs to return 011:12
slyonunfortunately there is currently no official way to check the config. If you're fine with it generating the config files in /run/systemd/... /run/NetworkManager/... you could run it with "sudo"11:14
slyonor prepare a temp root-dir and make use of the "generate --root-dir" option to validate the configs11:21
Lucas8037hello. I'm trying to change the MAC address for a USB WiFi dongle thru netplan, running Ubuntu 20.04.16:31
Lucas8037am using networkd as renderer, and under `wifis:` key, under my device `wlx...`, I added `macaddress:` with the desired MAC.16:32
Lucas8037this does generate a .link file in /run/systemd/network/10-netplan-$blah with `MACAddress=` to the right value under `[Link]`, and yet it's being ignored16:32
Lucas8037anyone has any clue why this isn't working?16:33
Lucas8037`udevadm test-builtin net_setup_link /sys/class/net/$dev` does show that the generated file is being sourced, together with `/usr/lib/systemd/{99-default,73-usb-net-by-mac}.link`16:34
Lucas8037the order in which files are sourced is 99, 73, 1016:35
Lucas803799 includes a somewhat sketchy `MACAddressPolicy=persistent`, which I feel is quite probably the one to blame16:36

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!