root@bionic-demo:~# cat /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
version: 2
ethernets:
accept-ra: no
eth0:
dhcp4: true
root@bionic-demo:~# python3 -c 'import yaml, json; print(json.dumps(yaml.load(open("/etc/netplan/50-cloud-init.yaml"))))'
{"network": {"version": 2, "ethernets": {"accept-ra": false, "eth0": {"dhcp4": true}}}}
root@bionic-demo:~# dpkg-query --show nplan
nplan 0.30
root@bionic-demo:~# netplan generate
Error in network definition //etc/netplan/50-cloud-init.yaml line 8 column 19: expected mapping